Lazy loading is a one of the most powerful ðŠ feature to strengthen Angular application performances.
As component additions progress, the Angular app gets bigger and heavier. ðŠĻ
Then, at some point, the app takes so much time to load (3s, 4s...) that users leave it. âđïļ
There, lazy-loading enters the game ð§âðĪ by loading a module only if the user need it (when he goes to the related URL),
so if the user does not browse the URL of a module, that app does not load the module linked to that URL ðĶļââïļ.
ðððŦð ððŦð ððĄð ðððŊðð§ððð ððŽ ðĻð ðĨððģðē-ðĨðĻðððĒð§ð :
ð The initial application loading is by far faster âĐ , because you only load a module rather than all the app modules.
ð You can load features on demand ð . You accelerate that way the loading time for the users going only on some parts of the app.
ð You can add new features without slowing down the whole app (consuming network bandwidth ⥠only for the feature module, while a monolith app would consume wider bandwidth for all the features at the same time)
ð This forces you to better architect ðšïļ your app, because all asynchronous routes (URL) are based on lazy-loading. You have consequently to cut âïļ your app, by grouping each feature in a module.
ððĻ ðĨððģðē-ðĨðĻðððĒð§ð ðĒðĶðĐðŦðĻðŊððŽ ðĐððŦððĻðŦðĶðð§ðððŽ, ðð§ð ðĒð ðĒðŽ ððĄð ððĒðŦðŽð ðððŽð ðĐðŦððððĒðð ððððĻðŦððĒð§ð ððĻ ððĻðĻð ðĨð ððĻ ðŽðĐððð ðŪðĐ ðēðĻðŪðŦ ððĐðĐ.