ionic2-input-mask
TypeScript icon, indicating that this package has built-in type declarations

0.18.6 • Public • Published

Ionic 2 Input Mask

Getting started

First, install it.

npm i ionic2-input-mask --save

Then, require it and use it:

import {Component} from '@angular/core';
import {Directive} from 'ionic2-text-mask'
 
@Component({
  selector: 'app',
  template: `
    <ion-input [textMask]="{mask: mask}" [(ngModel)]="myModel"/>
  `,
  directives: [Directive]
})
export class SomeComponent {
  public myModel = ''
  public mask = ['(', /[1-9]/, /\d/, /\d/, ')', ' ', /\d/, /\d/, /\d/, '-', /\d/, /\d/, /\d/, /\d/]
}

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.18.6
    6
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.18.6
    6
  • 0.18.5
    0
  • 0.16.2
    0

Package Sidebar

Install

npm i ionic2-input-mask

Weekly Downloads

2

Version

0.18.6

License

CC0-1.0

Last publish

Collaborators

  • msafi
  • ihadeed