1.0.1 • Published 4 years ago

ngx-time-mask v1.0.1

Weekly downloads
22
License
-
Repository
-
Last release
4 years ago

Installation

First you need to install the npm module:

npm install ngx-time-mask --save

Usage

1. Import the ngx-time-mask:

Once installed you need to import the main module into your application module by importing NgxTimeMaskModule.

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { NgxTimeMaskModule } from 'ngx-time-mask';

@NgModule({
  imports: [
    BrowserModule,
    NgxTimeMaskModule
  ],
  bootstrap: [AppComponent]
})
export class AppModule { }

2. Use the directive:

This is how you do it with the directive:

<input class="time-count" ngxTimeMask [(ngModel)]="data" (change)="onTimeChange($event)">

And in your component define data (12:00 by default).

Contribute

ngx-time-mask is packaged with ng-packagr and then imported into an Angular CLI app. To check the demo, click:


MIT © Avinash Maurya

1.0.1

4 years ago

1.0.0

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago