Angular - RxJS and Observables Fundamentals
Examine this Angular component:
What is the likely consequence if
export class SampleComponent implements OnDestroy {
private sub = this.api.getData().subscribe();
ngOnDestroy() {
// Missing unsubscribe here
}
}What is the likely consequence if
sub.unsubscribe() is not called in ngOnDestroy?