Why are multiple NgModules used in angular?
There are several benefits of using multiple NgModules, some of them are mentioned below.
- The modules help us to organize an application into associative blocks of functionality.
- First one is organizing an application code. If we are putting around a lot of resource files in the default app module and see the happening.
- And the second one is - It opens the possibility of lazy loading via the router.
- NgModule is used to simplify the ways we define and manage the dependencies in your applications and also you can consolidate different components and services into cohesive blocks of functionality.