s_jack_frost
s_jack_frost

Reputation: 79

Is there any downsides to preloading feature modules in Angular?

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.

Upvotes: 0

Views: 592

Answers (1)

qua_intrelle7
qua_intrelle7

Reputation: 1

Preloading is good for the modules which are to be visited by the user just after loading the application. Else, it just increases the size of the application to load and thus reduces performance. It's better to lazy load the component on the go.

Upvotes: 0

Related Questions