Configuring the main routes
When we start designing the architecture of an Angular application with routing, it is easiest to think about its main features, such as menu links that users can click to access. Products and shopping carts are basic features of the e-shop application we are currently building. Adding links and configuring them to activate certain features of an Angular application is part of the route configuration of the application.
You will need the source code of the Angular application we created in Chapter 8, Communicating with Data Services over HTTP, to follow along with the rest of the chapter. After you get the code, we suggest you take the following actions for simplicity:
- Remove the
auth.interceptor.ts
and its unit test file. Actual calls in the Fake Store API do not need authentication. - Modify the
app.config.ts
file so that theprovideHttpClient
method does not use the interceptor.
To set up the route configuration...