0

I just learned about preloading feature modules in Angular via adding this line inside the RootModules.forChild() method inside imports in your root module.ts file:

preloadingStrategy: PreloadAllModules

It seems to speed up my application! I am just wondering if there are any downsides to this or reasons why you would choose not to preload features modules.

  • The only thing I could think of is for people who visit a single url over a 4G connection that they'll be downloading your entire application over 4G, even when visiting only one url. Other than that, it only has upsides – Pieterjan Feb 21 '22 at 22:37
  • 1
    [This article](https://medium.com/angular-in-depth/network-aware-preloading-strategy-for-angular-lazy-loading-b883a0fbbaf0) explains how to implement a network aware preloadingstrategy – Pieterjan Feb 21 '22 at 22:48

0 Answers0