Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@molecule/pagination

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@molecule/pagination

Helper component for pagination in Angular and Ionic.

Source
npmnpm
Version
0.0.1
Version published
Weekly downloads
17
88.89%
Maintainers
1
Weekly downloads
 
Created
Source

MoleculeLifecycle

CircleCI Codecov npm (scoped)

The @MoleculeLifecycle-Decorator creates rxjs streams for all Angular and Ionic lifecycle hooks. Hooks will only be overridden when requesting their stream, in order to reduce unnecessary overhead.

@MoleculeLifecycle()
@Component({
  template: '{{latestDescription$|async}}'
})
export class YourComponent implements OnMoleculeLifecycle {
  @Input() description: Observable<string> | string;
  readonly latestDescription$: Observable<string>;
  readonly ngOnChanges$: Observable<SimpleChanges>;
  readonly ngOnDestroy$: Observable<void>;

  constructor() {
    this.latestDescription$ = this.ngOnChanges$.pluck('description', 'currentValue')
      .switchMap(newValue => {
        if (newValue instanceof Observable) {
          return <Observable<string>>newValue;
        } else {
          return Observable.of(newValue);
        }
      })
      .takeUntil(this.ngOnDestroy$)
      .subsrcibe();
  }
}

Installation

$ npm install --save @molecule/lifecycle-decorator

Author

Valentin Knabel, @vknabel, dev@vknabel.com

License

@molecule/lifecycle-decorator is available under the MIT license.

Keywords

ionic

FAQs

Package last updated on 18 Sep 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts