Skip to content

Instantly share code, notes, and snippets.

@stevermeister
Created June 3, 2017 19:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stevermeister/a1ec1b4b6ba2e2e17d92872030ff31b3 to your computer and use it in GitHub Desktop.
Save stevermeister/a1ec1b4b6ba2e2e17d92872030ff31b3 to your computer and use it in GitHub Desktop.
export class TestComponent {
constructor(private store: Store) { }
todos: Subscription;
ngOnInit() {
this.todosSubscription = this.store.select('todos').subscribe(console.log);
}
ngOnDestroy() {
this.todosSubscription.unsubscribe();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment