Answer the question
In order to leave comments, you need to log in
How are multi-page applications made with Angular?
In general, I study Angular and asked myself:
Well, let's say, if I want to somehow delimit the logic between 2 pages, can I do it? If yes, how is it done?
I looked for examples and did not find.
Now, as I understand it, after reading the manuals, the Index page is launched and elements are replaced by selectors in it with components.
Answer the question
In order to leave comments, you need to log in
For two pages, two app. This can be done within the same angular.json
For the transition, the usual href is put instead of routerLink
Clarify what " delimit logic " means to you. If you want a person to be able to add two different pages to their bookmarks, or if they have two pages in the URL window, then SPA can do it, praise the History API. And if you want the second page not to be built on the client, but given from the server, then this is a different calico, the only question is why, if for SEO, then SPA can do server rendering, and you will share the logic not only between two pages, but also between all good components.
Question to question: what does it mean for you to delimit logic?
You can make routing and use your own modules for each page, even with lazy loading.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question