@thiagoprz/ionic-input-mask
TypeScript icon, indicating that this package has built-in type declarations

0.0.5 • Public • Published

Ionic Mask Directive

Install

npm i @thiagoprz/ionic-input-mask

Usage

Import into your component's module and add the "mask" property to ion-input:

my-component.module.ts

import {IonicInputMaskModule} from "@thiagoprz/ionic-input-mask";

@NgModule({
    ...
    imports: [
        ...,
        IonicInputMaskModule
    ],
    ...
})
export class MyComponent {}

my-component.html

<ion-content>
    ...
    <ion-item>
      <ion-label>Phone</ion-label>
      <ion-input class="ion-text-right" [(ngModel)]="phone" maxlength="255" type="tel" placeholder="(99)9999-99999" mask="(**)****-*****"></ion-input>
    </ion-item>
    ...
</ion-content>

Package Sidebar

Install

npm i @thiagoprz/ionic-input-mask

Weekly Downloads

193

Version

0.0.5

License

MIT

Unpacked Size

33.6 kB

Total Files

17

Last publish

Collaborators

  • thiagoprz