You can write your own cleanup method. But faster way (but not trully convenient) is to use *ngIf. When value is false, component is completely removed (destroyed) from page. When it is back to true it goes via regular path constructor > ngOnInit, etc. Why it is not convenient?
- it may look ugly
- it may require from you to trigger change detection manually
.
reinitChildComponent(): void{
this.childVisible = false;
this.changeDetectorRef.detectChanges();
this.childVisible = true;
this.changeDetectorRef.detectChanges();
}