UNPKG

angular-countdown-date-time

Version:

angular countdown by end time

59 lines (44 loc) 1.28 kB
# angular-countdown-date-time angular countdown by end time ![Image of Yaktocat](http://oi68.tinypic.com/4ixwd3.jpg) ## Installation To install this library, run: <pre> npm install angular-countdown-date-time </pre> ## usage add to your module: ```javascript import { NgModule } from '@angular/core'; ... import { AngularCountdownDateTimeModule } from 'angular-countdown-date-time'; @NgModule({ imports: [ AngularCountdownDateTimeModule, ... ] }) export class YourModule { } ``` in your component define end time: ```javascript import { Component } from '@angular/core'; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.sass'] }) export class AppComponent { endTime = '2019-06-29T00:00:00'; } ``` in your html : ```html <lib-angular-countdown-dateTime [endDateBind]="endTime" [dayText]="'day'" [hourText]="'hour'" [minutesText]="'minute'" [secondsText]="'second'"> </lib-angular-countdown-dateTime> ``` for support RTL : ```html <div dir="rtl"> <lib-angular-countdown-dateTime [endDateBind]="endTime" [dayText]="'day'" [hourText]="'hour'" [minutesText]="'minute'" [secondsText]="'second'"> </lib-angular-countdown-dateTime> </div> ```