change detection destroy karma code example
Example: destroyed view: detectChanges
if (!this.changeDetectionRef['destroyed']) {
this.changeDetectionRef.detectChanges();
}
if (!this.changeDetectionRef['destroyed']) {
this.changeDetectionRef.detectChanges();
}