DEV Community

Discussion on: How To implement Lazy Loading in Angular

Collapse
 
venkatagandi profile image
venkata gandi

A new addition in Angular6, we will be referring directly to the module like
loadChildren:() => PostsModule();

Thread Thread
 
kanup profile image
kanup

You won't getting lazy loading if you do it this way (as you will be adding the reference).

Thread Thread
 
rutpshah profile image
Rut Shah

You can do this way. Just remove pair of braces.
loadChildren:() => PostsModule