Angular Router - Let's Get Lazy!
summary
Covers how Angular Router uses loadChildren syntax to split modules into webpack chunks (Angular CLI emits chunk files), demonstrates ad-hoc lazy loading of employee and admin modules, and shows a custom PreloadingStrategy toggling background fetch so modules are already downloaded before first navigation. Explains using canLoad vs canActivate guards to prevent unnecessary downloads when unauthenticated, and the demo verifies chunks appear only when expected and preloading works as configured.
AI-written summary · about
chapters (8)
- 0:00Introduction
- 1:11Angular Router basics
- 6:49Problem with big bundles
- 9:04Lazy loading setup
- 14:43Preloading strategy
- 19:49Router guards explained
- 23:11Demo overview
- 29:02Conclusion and Q&A
related talks
34mImproving Start-up Performance with Lazy Loading in Angular 2
17mBe lazy, but with strategy
32mImproving Startup Performance with Lazy Loading in Angular
33mAngular Router - Undiscovered Parts
29mAdv Lazy Loading w/ Angular
34mLazy-loading techniques beyond (Angular) router
30mDynamic and Lazy Loading: A Deep Dive
45mLazy Loading: Supercharge your Angular apps!
