In a single-page application, you change what the user sees by showing or hiding
portions of the display that correspond to particular components, rather than going
out to the server to get a new page. As users perform application tasks, they need
to move
between the different views that you have defined.
To handle the navigation from one view to the next, you use the Angular
Router. The Router enables navigation by interpreting a browser URL
as an instruction to change
the view.
Your complete route structure is place at app-routing.module.ts
file under src » app
Suppose you want to create a new module
then you have to add new routes for that modules.
Basic Route
Following are the fundamental building blocks to creating a route.
Import the AppRoutingModule into app.config.ts and add it
to the imports array.