JSPM

ionic-input-mask

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 66
  • Score
    100M100P100Q72980F
  • License MIT

Input mask for ionic2 and upper versions

Package Exports

  • ionic-input-mask

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ionic-input-mask) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

ionic-input-mask

Input mask for Ionic2 and upper versions.

Getting Started

Installing

npm install ionic-input-mask --save

Using

# app.module.ts
import { InputMaskModule } from 'ionic-input-mask';
imports: [
    InputMaskModule,
]
# *.html
<input-mask mask="+32 (0) 4__/__.__.__" allowedChars="0-9" type="tel" maskCharacter="_" tabindex="100"></input-mask>

mask

Mandatory
Definition of the mask. maskCharacter (default = '_') will define the maximum length of the field and which characters will be replaced in the mask. Mask is not included in the return value, only input typed by the user.

maskCharacter

Optional
Define which character in the mask should be replaced.
Default value is '_'.

allowedChars

Optional
Define which characters are allowed in the field. Must be character range like in regular expression.
Ex:

  • 0-9 -> Numbers only
  • A-Z -> Letters only, in uppercase

If not defined, all characters are allowed.

tabindex

Optional
Directly linked to ion-input field tabindex.

type

Optional
Directly linked to ion-input field type.