Created
June 3, 2017 19:03
-
-
Save stevermeister/a1ec1b4b6ba2e2e17d92872030ff31b3 to your computer and use it in GitHub Desktop.
This file contains 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 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