Skip to content

Instantly share code, notes, and snippets.

@ArtemRomanovsky
Created February 20, 2020 11:53
Show Gist options
  • Select an option

  • Save ArtemRomanovsky/9b126d57103f00326b93f860449a803e to your computer and use it in GitHub Desktop.

Select an option

Save ArtemRomanovsky/9b126d57103f00326b93f860449a803e to your computer and use it in GitHub Desktop.
export class ChildComponent implements OnChanges {
constructor(public cd: ChangeDetectorRef) {
this.cd.detach();
}
ngOnChanges(values) {
this.cd.reattach();
setTimeout(() => {
this.cd.detach();
})
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment