core/src/rxjs/destroyable/destroyable.ts
Facilitates working with components, directives and services which manually subscribe to observables. Extend this class to easily hook into ngOnDestroy and avoid memory leaks.
See Wiki for full guide.
Properties |
|
Methods |
|
ngOnDestroy |
ngOnDestroy()
|
Returns:
void
|
Protected subscribe | ||||||||||||||||||||
subscribe(observable: Observable
|
||||||||||||||||||||
Type parameters:
|
||||||||||||||||||||
Subscribes to an observable and stores the subscription for automatic disposal.
When
Parameters:
Returns:
Subscription
The subscription created for the observable. |
||||||||||||||||||||
Protected subscribe | |||||||||||||||
subscribe(observable: Observable
|
|||||||||||||||
Type parameters:
|
|||||||||||||||
Parameters:
Returns:
Subscription
|
|||||||||||||||
Protected Readonly destroyed |
Type: Subject<void>
|
Default value: new Subject()
|
Emits a value when |
Protected Readonly subscriptions |
Type: Subscription
|
Default value: new Subscription()
|
A list of all subscriptions manually added using the |