Indigosoft / ngxd

✨🦊 NgComponentOutlet + Data-Binding + Full Lifecycle = NgxComponentOutlet for Angular 7, 8, 9, 10, 11, 12, 13, 14, 15, 16+
MIT License
321 stars 29 forks source link

ngOnDestroy doesn't get called on child component when changing to a different one #27

Closed jpike88 closed 4 years ago

jpike88 commented 4 years ago

I'm guessing this is incorrect behaviour?

If not, is there another way to detect when this occurs in the child component, as it may need reinitialisation?

thekiba commented 4 years ago

Hello @jpike88! NgOnDestroy should be always called on child components when destroyed or we change to another one.

So, can you reproduce that issue on Stackblitz? You could use this as template https://stackblitz.com/edit/angular-simple-dynamic

jpike88 commented 4 years ago

dont worry its an issue with my own implementation never mind