Skip to content
A contextual component to show a countdown timer. Uses Moment.js
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
addon
app
config
tests
vendor
.editorconfig
.ember-cli
.eslintignore
.eslintrc.js
.gitignore
.npmignore
.template-lintrc.js
.travis.yml
.watchmanconfig
CONTRIBUTING.md
LICENSE.md
README.md
ember-cli-build.js
index.js
package.json
testem.js
yarn.lock

README.md

ember-timer

A contextual component to show a countdown timer. Uses Moment.js

Compatibility

  • Ember.js v2.18 or above
  • Ember CLI v2.13 or above
  • Node.js v8 or above

Installation

ember install ember-timer

Usage

The timer component expects a to argument which is Moment Object. And an optional onEnd argument, which is called after timer ends.

<Timer 
    @to={{countToMomentObject}} 
    @onEnd={{action "onEnd"}}
as |t|/>
    DaysLeft: {{t.days}}
    HoursLeft: {{t.hours}}
    MinutesLeft: {{t.minutes}}
    SecondsLeft: {{t.seconds}}
</Timer>

Contributing

See the Contributing guide for details.

License

This project is licensed under the MIT License.

You can’t perform that action at this time.