amarkes / br-mask

MIT License
116 stars 56 forks source link

converting from Ionic 3 #10

Closed blondie63 closed 5 years ago

blondie63 commented 5 years ago

I've used br-mask for Ionic 3 without problem Now i'm trying to use this Ionic 4 version, with a same code: <ion-input type="text" placeholder="{{'SIGNUP.PHONE_CODE' | translate}}" formControlName="phone_code" required [brmasker]="{mask:'+00000', len:6, type: 'num'}"></ion-input> but i've this error: ERROR TypeError: Cannot read property 'value' of undefined at BrMaskDirective.push../node_modules/br-mask/dist/directives/br-mask.js.BrMaskDirective.initialValue (br-mask.js:40) at BrMaskDirective.push../node_modules/br-mask/dist/directives/br-mask.js.BrMaskDirective.ngOnInit (br-mask.js:37) at checkAndUpdateDirectiveInline (core.js:22098) at checkAndUpdateNodeInline (core.js:23362) at checkAndUpdateNode (core.js:23324) at debugCheckAndUpdateNode (core.js:23958) at debugCheckDirectivesFn (core.js:23918) at Object.eval [as updateDirectives] (SignupPage.html:54) at Object.debugUpdateDirectives [as updateDirectives] (core.js:23910) at checkAndUpdateView (core.js:23306)

Some help? Thanks

amarkes commented 5 years ago

‘’’html form [formGroup]="form">

‘’’

Set prop form