Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Component({})
- export class ExampleComponent implements OnDestroy{
- private subscriptions = [];
- constructor(){
- this.subscriptions.push(this.anyObservable.subscribe());
- }
- ngOnDestroy(){
- for(let subscription of this.subscriptions){
- subscriptions.unsubscribe();
- }
- }
- }
Add Comment
Please, Sign In to add comment