1.0.4 • Published 7 months ago

ngx-lc-autounsubscribe v1.0.4

Weekly downloads
-
License
-
Repository
-
Last release
7 months ago

NgxApAutounsubscribe

This project is compatible with Angular 13+ versions.

Class decorator that will automatically unsubscribe from observable subscriptions when the component is destroyed without implement ngOnDestroy lifecycle.

Installation

Install this package with npm, with following command: npm install ngx-lc-autounsubscribe

Usage

import { AutoUnsubscribe } from "ngx-lc-autounsubscribe";

@AutoUnsubscribe()
export class ExampleComponent {
  testSubscription: Subscription;

  ngOnInit() {
    this.testSubscription = Observable.interval.subscribe(data => // do something);
  }
}

Options

Start Local Environment

Run ng serve for a dev server. Navigate to http://localhost:4200/. The application will automatically reload if you change any of the source files.

Contributing

To get more help on the Angular CLI use ng help or go check out the Angular CLI Overview and Command Reference page.

1.0.4

7 months ago

1.0.3

7 months ago

1.0.2

7 months ago

1.0.1

7 months ago

1.0.0

7 months ago