Created
June 6, 2019 23:08
-
-
Save arturovt/ec9062afbec2e4bba2ee05dbb175e0dd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function detectChanges<T>(ref: ChangeDetectorRef) { | |
return finalize<T>(() => !(ref as ViewRef).destroyed && ref.detectChanges()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment