ni-clock
v0.0.11
Published
Angular Clock Component
Readme
NiClock
Angular Clock Component
Installation
npm i ni-clockimport { NiClockModule } from 'ni-clock'; // <= import
@NgModule({
declarations: [
AppComponent
],
imports: [
NiClockModule, // <= register
]
bootstrap: [AppComponent]
})
export class AppModule { }Example
- Your component class:
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.less']
})
export class AppComponent implements OnInit {
date = new Date();
// ...
}- Your component html template:
<ni-clock [time]="value" [auto]="false"></ni-clock>
<!-- ... -->API
- [time]: specifies the date object that is used to show the clock.
- [auto]: if true, the clock start ticking. true by default.
