Preload All Lazy Loaded Modules with Angular

Share this video with your friends

Social Share Links

Send Tweet
Published 5 years ago
Updated 4 years ago

When you lazy load a module (see according lesson on the topic) the user gets the benefit of faster loading of the application. However this comes at the cost of a delay when the module gets loaded at runtime. To mitigate this issue, we can apply some preloading strategy. Angular comes with a default one, that preloads all lazy modules. Let's see how to implement that.