@ngx-cocktail/destroyable
TypeScript icon, indicating that this package has built-in type declarations

14.0.4 • Public • Published

@ngx-cocktail/destroyable

The library contains code for destoyable feature.

Warning! This feature is experimental and can include known and undiscovered errors.

GitHub issues GitHub forks GitHub stars GitHub license

Support Support Support Support Support Support

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

  1. Commit & push your changes
  2. Update a version in package.json
  3. Run npm run build:destroyable
  4. Navigate to dist/destroyable
  5. Run npm publish

Package Sidebar

Install

npm i @ngx-cocktail/destroyable

Weekly Downloads

0

Version

14.0.4

License

MIT

Unpacked Size

23.3 kB

Total Files

19

Last publish

Collaborators

  • kostetskyroma