Skip to content

rahulrsingh09/angular2-simple-countdown

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

angular2-simple-countdown

a simple countdown angular2 directive with multiple language

npm version

Installation

Npm

npm install angular2-simple-countdown

Usage

import {CountDown} from "../../node_modules/angular2-simple-countdown/countdown";

@NgModule({
  declarations: [
    CountDown
  ],
  ....
  
  })

text: any = { "Weeks": "Weeks", 
    "Days": "Days", "Hours": "Hours",
     Minutes: "Minutes", "Seconds": "Seconds",
    "MilliSeconds":"MilliSeconds" };

`Change Default Text`
<count-down [text]="text" units="Days | Hours | Minutes | Seconds | Milliseconds" end="February 22, 2016"></count-down>





<count-down units="Days | Hours | Minutes | Seconds | Milliseconds" end="February 22, 2016"></count-down>
<count-down units="Days | Hours " end="February 22, 2016"></count-down>
<count-down units="Days | Hours | Minutes | Seconds" end="February 22, 2016"></count-down>

Field Schema

count-down: initializes directive

end-date: the end date. takes any format js Date() allows

units: which units you want the countdown to be viewed in

https://scotch.io/tutorials/angular-2-transclusion-using-ng-content

About

a simple countdown angular2 directive with multiple language

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 100.0%