Creating Feature Routing Modules
Learn how to add a dedicated routing module in an Angular application to improve its scalability and organization.
We'll cover the following
We 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 this problem, we should create a separate feature module for our components that will also have a dedicated routing module (we already created a products module). We will use it in our application so that any product-related functionality is contained inside that module:
Adding products and auth modules in our application
Open the
styles.css
file of the current Angular project and add the following content to it:
Get hands-on with 1200+ tech skills courses.