@ngx-cocktail/destroyable
v14.0.4
Published
The library contains code for destoyable feature.
Downloads
5
Maintainers
Readme
@ngx-cocktail/destroyable
The library contains code for destoyable feature.
Warning! This feature is experimental and can include known and undiscovered errors.
What's New
- Angular 14 support 🥳
Compatibility
| Angular 14 | Angular 13 | Angular 12 | Angular 11 | Angular 10 | Angular 9 |
| ----------- | ----------- | ----------- | ----------- | ----------- | ---------- |
| >=v14.0.1
| >=v13.0.1
| >=v12.0.1
| >=v11.0.1
| >=v10.0.1
| >=v9.0.1
|
Installation
npm install @ngx-cocktail/common @ngx-cocktail/destroyable
Usage
import { Features } from '@ngx-cocktail/common';
import { DestroyableFeature } from '@ngx-cocktail/destroyable';
@Features([DestroyableFeature()])
export class AppComponent implements OnInit {
public destroyed$!: Observable<unknown>;
ngOnInit(): void {
interval(1000)
.pipe(takeUntil(this.destroyed$))
.subscribe((value) => {
...
});
}
}
Publishing
- Commit & push your changes
- Update a version in package.json
- Run
npm run build:destroyable
- Navigate to
dist/destroyable
- Run
npm publish