Angular & Signals (283 Qs)•Part 9: NgModules, Providers, NgZone & Injector Hierarchies (213 - 255)
What are the types of feature modules?
Below are the five categories of feature modules,
- Domain: Deliver a user experience dedicated to a particular application domain(For example, place an order, registration etc)
- Routed: These are domain feature modules whose top components are the targets of router navigation routes.
- Routing: It provides routing configuration for another module.
- Service: It provides utility services such as data access and messaging(For example, HttpClientModule)
- Widget: It makes components, directives, and pipes available to external modules(For example, third-party libraries such as Material UI)
Practical Code Example
text
// Types of Feature Modules:
// 1. Domain Feature Modules (deliver specific user stories)
// 2. Routed Feature Modules (lazy-loaded routes)
// 3. Routing Modules (define routing configuration)
// 4. Shared Modules (re-export common directives and pipes)