ionic2-input-mask
Input mask for Ionic2 apps
Last updated 3 years ago by ihadeed .
CC0-1.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install ionic2-input-mask 
SYNC missed versions from official npm registry.

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/]
}

Current Tags

  • 0.18.6                                ...           latest (3 years ago)

3 Versions

  • 0.18.6                                ...           3 years ago
  • 0.18.5                                ...           3 years ago
  • 0.16.2                                ...           3 years ago
Maintainers (2)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 1
Dependencies (6)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |