JSPM

ngx-countdown-2

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

Simple, easy and performance countdown for angular. Ticker event that emits every seconds

Package Exports

  • ngx-countdown-2

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ngx-countdown-2) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

ngx-countdown

Simple, easy and performance countdown for angular

NPM version Build Status

Versions:

Angular Version ngx-countdown
Angular5 NPM version
Angular4 1.0.6

Demo

Live Demo

Usage

1. Install

npm install ngx-countdown-2 --save

import CountdownModule

import { CountdownModule } from 'ngx-countdown';

@NgModule({
    imports: [ BrowserModule, CountdownModule ],
    declarations: [AppComponent],
    bootstrap: [AppComponent]
})
export class AppModule { }

2、Template

<countdown [config]="config"
    (start)="onStart()"
    (finished)="onFinished()"
    (notify)="onNotify($event)"></countdown>
Name Type Default Summary
config Config - see Config
begin() - - Triggers when {demand: false}
restart() - - -
stop() - - -
pause() - - -
resume() - - -
start EventEmitter - Triggers when start
finished EventEmitter - Triggers when finished
ticker EventEmitter - Triggers every second
notify EventEmitter(time: number) - Triggers when notify, need setting config.notify values
event EventEmitter<{ action: string, left: number }> - Catch all event

How call component methods

@ViewChild(CountdownComponent) counter: CountdownComponent;
resetTimer(){
    this.counter.restart();
    this.counter.stop();
    this.counter.pause();
    this.counter.resume();
}

Troubleshooting

Please follow this guidelines when reporting bugs and feature requests:

  1. Use GitHub Issues board to report bugs and feature requests (not our email address)
  2. Please always write steps to reproduce the error. That way we can focus on fixing the bug, not scratching our heads trying to reproduce it.

Thanks for understanding!

License

The MIT License (see the LICENSE file for the full text)