DEV Community

[Comment from a deleted post]
Collapse
 
stativka profile image
Eugene Stativka • Edited

Hi David, really nice article! Do you know if it is possible to make this approach work for zoneless apps ({ ngZone: 'noop' })? I've tried but it seems like it can work only with zone.js. Without it, the lazy-loaded component renders only static elements in the template. E.g. anything using async pipe does not work. Any idea?

Collapse
 
stativka profile image
Eugene Stativka

Oh, probably, I just have to trigger the change detection manually after creation of the componentRef: componentRef.changeDetectorRef.detectChanges(). I think it works now.

Collapse
 
daviddalbusco profile image
David Dal Busco

Hey @stativka sorry for my late answer! Mega cool question and really happy that you even find and share the solution, really kind of your and good to know 👍