Created
January 15, 2018 08:27
-
-
Save vivainio/383f143df70efa40ff57931836489f22 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
// create function that runs detectchanges after running the function | |
export function andDetectChanges(cdr: ChangeDetectorRef, expr: () => void) { | |
function changeDetectWrapper() { | |
expr(); | |
cdr.detectChanges(); | |
} | |
return changeDetectWrapper; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment