Skip to content

vijender1256/ng2-inputmask

 
 

Repository files navigation

ng2-inputmask npm npm

Angular 2 directive input mask

Installation

To install this library, run:

$ npm install ng2-inputmask --save

Consuming your library

import library in any Angular application by running:

$ npm install ng2-inputmask

and then from your Angular AppModule:

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppComponent } from './app.component';

// Import library
import { InputMaskModule } from 'ng2-inputmask';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,

    // Specify your library as an import
    InputMaskModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

Use

  <input mask="00:00:00">
  <input mask="AAAA">

Placeholders

0 - number
A - text char

Development

To generate all *.js, *.d.ts and *.metadata.json files:

$ npm run build

To lint all *.ts files:

$ npm run lint

About

Angular 2 directive input mask

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 56.0%
  • TypeScript 44.0%