Back to Developer Roadmap

Lazy Loading Modules

src/data/roadmaps/angular/content/[email protected]

4.0735 B
Original Source

Lazy Loading Modules

By default, NgModules are eagerly loaded. This means that as soon as the application loads, so do all the NgModules, whether they are immediately necessary or not. For large applications with lots of routes, consider lazy loading —a design pattern that loads NgModules as needed. Lazy loading helps keep initial bundle sizes smaller, which in turn helps decrease load times.

Visit the following resources to learn more: