Unsubscribe All
Angular - Unsubscribe all Subscribed observable on ngDestroy using decorator @UnsubscribeAll()
The subscriber do occupy space in memory and should be released (unsubscribe) of their space once we are done using them. @Unsubscribeall() release all memory once navigate out from the component.
Installation
$ npm install -g unsubscribe-all
Usage
@ // Call on ngDestory unsubscribe all subscribe observable@{} implements OnInit OnDestroy private subscribe: Subscription; { } { thissubscribe = thistestService } ngOnDestory{}