Please enable JavaScript.
Coggle requires JavaScript to display documents.
Angular module - Coggle Diagram
Angular module
Featured Module
Lazy Loading
-
Do not import lazy loaded modules in any other modules. This will make the angular to load the module eagerly and can have unexpected bugs.
Be careful when you import other modules in the lazy loaded module. If the other modules providers any services, then the lazy loaded module will get a new instance of the service.
Preloading Strategy
Preloading in Angular means loading the Lazy loaded Modules in the background asynchronously, while user is interacting with the app. This will help boost up the loading time of the app
-
-
Shared Module
Where store all the common ui or functionalty of the app. export:[item1,item2,item3] , if you want to use these item in other modules.
The Angular module (also known as ngModule) helps us to organize the application parts into cohesive blocks of functionality. Each block focuses on providing a specific functionality or a feature.
The Modular design helps to keep the Separation of concerns. Keep the features together. Makes it easy to maintain the code. Makes it easier to reuse the code
This is where components, directives, and pipes that belong to this NgModule are declared
If you want this ngModule require any feature or functionality, then those modules need to be imported here
Any components, directives, and pipes that are defined and exported in that module can be used in this module
-
-
The Services, which you want to add to the global collection of services are added here
The application needs only one instance of the services provided by the RouterModule since the services are global scope need to register only one module. Error if you register more than one module
If you want other modules to use the component, pipes, directives of this NgModule, then those must be specified here
The main component of this module, which needs to be loaded when the module is loaded is specified here
This is a must if you are the first module ( called the root module) that is loaded when the Angular App starts and load the first view
If the module is not the root module, then you should keep this blank
-