0.2.2 • Published 7 years ago
cd-clock v0.2.2
cd-clock
Angular2 component library to display your current time.
Features
ClockComponent
Use the ClockComponent by including:
<cd-clock></cd-clock>
in your HTML templates.
Color Directives
<p cdPurple></p>
<p cdBlue></p>
<p cdPink></p>
Installation
To install this library, run:
$ npm install cd-clock --save
Import the 'ClockModule' into your module, i.e. AppModule
:
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
// Import your library
import { ClockModule } from 'cd-clock';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
// See Below!
ClockModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
Once the library is imported, you can use its components, directives and pipes in your Angular application:
<h1>
{{title}}
</h1>
<cd-clock></cd-clock>
License
MIT © Christian Slijngard