angular-countdown-date-time

angular countdown by end time

Usage no npm install needed!

<script type="module">
  import angularCountdownDateTime from 'https://cdn.skypack.dev/angular-countdown-date-time';
</script>

README

angular-countdown-date-time

angular countdown by end time

Image of Yaktocat

Installation

To install this library, run:

npm install angular-countdown-date-time

usage

add to your module:

import { NgModule } from '@angular/core';
...

import { AngularCountdownDateTimeModule } from 'angular-countdown-date-time';
 
@NgModule({
  imports: [
  AngularCountdownDateTimeModule,
  ...
  ]
})
export class YourModule { }

in your component define end time:

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 :

<lib-angular-countdown-dateTime [endDateBind]="endTime" [dayText]="'day'" [hourText]="'hour'" [minutesText]="'minute'" [secondsText]="'second'"> </lib-angular-countdown-dateTime>

for support RTL :

<div dir="rtl">
<lib-angular-countdown-dateTime [endDateBind]="endTime" [dayText]="'day'" [hourText]="'hour'" [minutesText]="'minute'" [secondsText]="'second'"> </lib-angular-countdown-dateTime>
</div>