RobinHerbots / Inputmask

Input Mask plugin
https://robinherbots.github.io/Inputmask/
MIT License
6.39k stars 2.17k forks source link

Inputmask and Ionic 3 #1671

Open adrianoleiterodrigues opened 7 years ago

adrianoleiterodrigues commented 7 years ago

Can anyone tell me if Inputmask is compatible with Ionic 3? I'm having "Cannot read property 'type' of undefined" error.

Package installed with: npm install inputmask --save

testpage.ts

import Inputmask from "inputmask";

ionViewDidLoad() {
  Inputmask().mask(document.querySelectorAll("input"));
}

testpage.html

<ion-input type="text" data-inputmask="'mask': '9', 'repeat': 10"></ion-input>

Page loads fine, but when I click on the input I get the error.

Thanks.

CitizenBeta commented 5 years ago

Same, even after installing with npm it's unavailable for use. Any advice on how to get started using Inputmask with Ionic 3 or Angular would be very helpful.

RobinHerbots commented 5 years ago

@adrianoleiterodrigues , @CitizenBeta ,

Can you setup a demo somewhere, or create a codepen as an example.