Hey there,
Just tried to set this up and quickly ran into the following error. Not sure what I'm doing wrong but any help would be appreciated. Thanks! Using your recent Angular 5.0.0 release.
Uncaught TypeError: Cannot read property 'subscribe' of null
at http://localhost:8100/build/main.js:102229:14
at new t (http://localhost:8100/build/polyfills.js:3:11329)
at toPromise (http://localhost:8100/build/main.js:102227:12)
at _convertToPromise (http://localhost:8100/build/main.js:10800:187)
at Array.map (native)
at http://localhost:8100/build/main.js:10793:80
at http://localhost:8100/build/main.js:10806:49
at Array.map (native)
at _executeAsyncValidators (http://localhost:8100/build/main.js:10806:23)
at FormControl.asyncValidator (http://localhost:8100/build/main.js:10793:28)
And my stuff:
this.emailForm = this.fb.group({
email: [this.auth.getUser().local.email, [Validators.required, CustomValidators.email]]
});
phoneNum = '';
mask: any = {
mask: ['(', /[1-9]/, /\d/, /\d/, ')', ' ', /\d/, /\d/, /\d/, '-', /\d/, /\d/, /\d/, /\d/],
placeholderChar: ' ',
guide: false
};
I tried with and without [(ngModel)]:
<ion-item>
<ion-label floating>Telephone number</ion-label>
<ion-input [textMask]="mask" formControlName="phone" type="phone" placeholder=""></ion-input>
</ion-item>
Thoughts? Thanks. I also tried without
Errr. I might be an idiot. Hang on.
Yup. Thanks :)
what's the solution for you?
[textMask]="mask" -> [textMask]="{mask: mask}"
Most helpful comment
what's the solution for you?