npm.io
2.0.1 • Published 9 years ago

ng2-ert-clock

Licence
ISC
Version
2.0.1
Deps
1
Vulns
0
Weekly
0

ERT-CLOCK for Angular 2

Overview

Angular 2 component that shows a clock set on the timezone provided as component input.
This component time is Daylight Saving Time aware. AoT ready.

How to use it

  1. Install with npm install ng2-ert-clock

  2. Integrate node_modules/ng2-ert-clock/ert-clock.css or node_modules/ng2-ert-clock/src/ert-clock.scss in your CSS/SCSS.

  3. Optional - Import node_modules/ng2-ert-clock/quadrant1.png in your asset folder

  4. If needed, overwrite CSS rule on .ert-clock in order to use fix the desired quadrant as background-image

  5. Import the Angular 2 module into your module using import { ErtClockModule } from 'ng2-ert-clock'; and put ErtClockModule in your module imports

    Example:

    import { ErtClockModule } from 'ng2-ert-clock';

    @NgModule({ imports: [ErtClockModule], ...

  6. Use the clock adding a ert-clock element in your template with a valid momentJsPlace input

    Example:

    <ert-clock [momentJsPlace]="'America/Los_Angeles'">
    <ert-clock [momentJsPlace]="'Europe/Rome'">

Demo

Demo available: https://bitbucket.org/eurisredteam/ng2-ert-clock-demo

Questions?

Feel free to contact the author!

Keywords