Feature Modules are additional
modules which can be added to the root module for better modularity and
maintainability of the Angular applications. Feature modules also help
improving the performance of larger applications using lazy loading where only
the root module is loaded initially other modules are loaded on demand thereby
improving performance.
There are 6 different types of feature modules in Angular, they are.
Domain feature modules.There are 6 different types of feature modules in Angular, they are.
Routed
feature modules.
Routing
modules.
Service
feature modules.
Widget feature modules.Domain feature modules are modules created based on the domain/business logic of the application, for example a large Inventory application could have domain feature modules like Orders, Sales, Stock etc.
Routed feature modules are modules which are loaded using Routing, lazy loaded feature modules fall under this category where each of the feature module is mapped to the root modules routes and loaded dynamically when the route is invoked.
Routing modules provide different routing for the root module and the feature modules, the root module will have its own routing and each feature module can have its own routing configured.
Service modules, as the name implies these modules provide only services without any UI / declarations. These modules expose only service providers. HttpClient module is an example of a service module.
Widget modules, expose specific pieces of UI widgets which can be embedded in the root module. 3rd party UI components fall under this category which expose specific UI controls which can be imported and embedded in the parent root components.
No comments:
Post a Comment