Skip to content

Instantly share code, notes, and snippets.

@Purecaesar
Created July 5, 2021 10:15
Show Gist options
  • Save Purecaesar/6a3bae4f707edb9a43ce8914862d26d9 to your computer and use it in GitHub Desktop.
Save Purecaesar/6a3bae4f707edb9a43ce8914862d26d9 to your computer and use it in GitHub Desktop.
...
cdr = compRef.injector.get(ChangeDetectorRef);
compRef.onDestroy(() => {
inited = false;
destroyer.next();
});
return routeWithData.data.pipe(
pluck(name || key),
takeUntil(destroyer)
);
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment