Why do we need lazy loading of modules & how its implementation is done?

900    Asked by SarahLee in Python , Asked on Jan 25, 2020
Answered by Sarah Lee

Lazy loading of modules is needed to break the code into pieces. When downloading the app in the browser, it doesn’t load all of the application code. Throughout the transition to the route with lazy loading, the module has to load the code into a browser.

Example showing how we can use using lazy loading modules:


   path: 'login', loadChildren: () => System.import('./login/login.module')


Your Answer


Parent Categories