Skip to content

Instantly share code, notes, and snippets.

@ronnyek
Last active September 18, 2019 20:27
Show Gist options
  • Select an option

  • Save ronnyek/09b429f5b1641f25ecf11d57b89af45c to your computer and use it in GitHub Desktop.

Select an option

Save ronnyek/09b429f5b1641f25ecf11d57b89af45c to your computer and use it in GitHub Desktop.
export class SomeNewComponent extends Unsubscribable(ComponentRoot){
constructor(someObservable: Observable){
super(); //must be called because we extend base
someObservable
.pipe(takeUntil(this.unsubscribeAll))
.subscribe(value => {//do something with value});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment