Created
June 4, 2020 09:38
-
-
Save MarsiBarsi/b75c96f5490221e39fbe4e65650732e7 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 watch<T>( | |
changeDetectorRef: ChangeDetectorRef, | |
): MonoTypeOperatorFunction<T> { | |
return (source: Observable<T>) => | |
source.pipe( | |
tap(() => { | |
changeDetectorRef.markForCheck(); | |
}), | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment