Skip to content

Instantly share code, notes, and snippets.

@MarsiBarsi
Created June 4, 2020 09:38
Show Gist options
  • Save MarsiBarsi/b75c96f5490221e39fbe4e65650732e7 to your computer and use it in GitHub Desktop.
Save MarsiBarsi/b75c96f5490221e39fbe4e65650732e7 to your computer and use it in GitHub Desktop.
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