These are the slides and the sample project I used for my talk at ng-be in Belgium (December 2016), where I demonstrated how to implement lazy loading in Angular.
Topics covered in the talk:
- Setting up lazy loading in an application
- Preventing lazy loading with route guards
- Implementing preloading for faster navigation
- Building custom preloading strategies
- Managing shared modules in a lazy-loaded setup
Note: I deliberately left the AppModule as a single module—no separate CoreModule —to keep the demo simple and focused, as this has been a common question.
Resources to download:
Recommended follow-up reads:
- Sticky Routes In Angular 2.3+ With RouteReuseStrategy
- Optimizing Performance With Preloading And The New Angular Router
- Angular 2 AOT Compilation And Tree Shaking With Webpack2 And/Or Rollup: Step By Step
