Skip to content

Lazy Loading & Preloading

Lazy loading defers loading modules until needed. Preloading downloads lazy chunks in the background after initial load.

provideRouter(routes, withPreloading(PreloadAllModules))
// or
provideRouter(routes, withPreloading(PreloadAllModules))

Combine lazy loading with preloading for optimal performance.”