Submodules with lazy loading

Lazy loading allows the Angular build process, powered by webpack, to separate our web application into different JavaScript files called chunks. By separating out portions of the application into separate submodules, we allow these modules and their dependencies to be bundled into separate chunks, thus keeping the initial JavaScript bundle size to a minimum. As the application grows, the time to first meaningful paint remains a constant, instead of consistently increasing over time. Lazy loading is critical to achieving a scalable application architecture.

We will now go over how to set up a submodule with components and routes. We will also use Augury to observe the effects of our various router configurations. ...

Get Angular 6 for Enterprise-Ready Web Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.