JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 10
  • Score
    100M100P100Q49127F
  • License MIT

Package Exports

  • @ngx-cocktail/destroyable
  • @ngx-cocktail/destroyable/package.json

Readme

@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