angular check if view is destroyed code example
Example: destroyed view: detectChanges
if (!this.changeDetectionRef['destroyed']) {
this.changeDetectionRef.detectChanges();
}
if (!this.changeDetectionRef['destroyed']) {
this.changeDetectionRef.detectChanges();
}