0.0.4 • Published 6 years ago
ng-time-picker v0.0.4
ng-time-picker
Analog Time Picker based on Angular 2+
Description
This project was generated with Angular CLI version 1.5.0. It's my tiny attempt to publish my second node package. I may not continue to support this package. But lets see!
Installation
To install this module to an external project, follow the procedure:
npm install ng-time-picker --save
Add TimePickerModule import to your @NgModule like example below.
import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { AppComponent } from './app.component'; import { TimePickerModule } from 'ng-time-picker';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
TimePickerModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
```
Usage
You just need to listen to the event emitter of the component.
<ng-time-picker (notify)="onNotify($event)"></ng-time-picker>
Use the function in your component:
```ts
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
onNotify($event) {
console.log($event);
}
}
```
Demo
Online demo is here.
Github:
https://github.com/saadbinamjad/ng-time-picker
Package:
https://www.npmjs.com/package/ng-time-picker
License
- License: MIT
Author
- Author: saadbinamjad
Keywords
- Angular
- Angular2
- Angular 2+
- Time Picker