DEV Community

Discussion on: How To implement Lazy Loading in Angular

Collapse
 
maxart2501 profile image
Massimo Artizzu

I wish Angular had component-based lazy loading...

Collapse
 
venkatagandi profile image
venkata gandi

Correct me if iam wrong, we do have a way for it through template binding

inside the code we can read this variable through viewchild,
then through viewcontainer ref we can creatembeddedview(of respective component)
It will sit inside this template.

Collapse
 
maxart2501 profile image
Massimo Artizzu

That's dynamically creating component instances, not component lazy loading.

What I mean is loading the code of a component only when said component is needed.