Why do we need lazy loading of modules & how its implementation is done?
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')
},