1.4.0 • Published 5 years ago

unsubscribe-all v1.4.0

Weekly downloads
5
License
ISC
Repository
github
Last release
5 years ago

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

@UnsubscribeAll() // Call on ngDestory unsubscribe all subscribe observable
@Component(){}
export class TestComponent implements OnInit OnDestroy {

private subscribe: Subscription;
   constructor(private testService: TestService) { }

  ngOnInit() {
    this.subscribe = this.testService.callService().subscribe( res => {
      console.log(res);
    })
  }

  ngOnDestory{}
}
1.5.0

5 years ago

1.4.0

5 years ago

1.3.0

5 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago