Creating feature routing modules
At this point, we have set up the route configuration so that routing works the way it should. However, this approach doesn't scale so well. As our application grows, more and more routes may be added to the routing module of the main application module. To overcome the previous problem, we should create a separate feature module for our components that will also have a dedicated routing module. We have already created the products module in the previous chapter. We will use it in our application so that any product-related functionality is contained inside that module:
- Copy the global CSS styles from the code samples of Chapter 8, Communicating with Data Services over HTTP, inside the
styles.cssfile of the current Angular project. - Delete the
src\app\productsfolder from the current Angular CLI project. - Copy the
productsandauthfolders from Chapter 8, Communicating with Data Services over HTTP, in thesrc\appfolder of the current...