Q. How do you lazy load a feature module in Angular?

  • (A) Import the module eagerly in app.module.ts
  • (B) Use loadChildren in route configuration
  • (C) Use *ngIf directive
  • (D) Declare the module in declarations array
πŸ’¬ Discuss
βœ… Correct Answer: (B) Use loadChildren in route configuration
Explanation: loadChildren dynamically loads a module on-demand during routing.
Explanation by: Mr. Dubey
loadChildren dynamically loads a module on-demand during routing.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
74
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
90%
Success Rate