InterviewHubPRO
Section Overview
Q231

Question 231 of 283

Part 9: NgModules, Providers, NgZone & Injector Hierarchies (213 - 255)

82%
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,

  1. Domain: Deliver a user experience dedicated to a particular application domain(For example, place an order, registration etc)
  2. Routed: These are domain feature modules whose top components are the targets of router navigation routes.
  3. Routing: It provides routing configuration for another module.
  4. Service: It provides utility services such as data access and messaging(For example, HttpClientModule)
  5. 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)