nikhiln / ngx-international-phone-number

A simple international telephone number input for Angular
MIT License
42 stars 79 forks source link

[ngClass] cannot be detect #57

Open Arios509 opened 5 years ago

Arios509 commented 5 years ago

Hi there, i would like to ask about the problem that the Angular 8 [ngClass] this one cannot be add into the

 <international-phone-number  placeholder="Enter phone number" 
              [maxlength]="20" [defaultCountry]="'us'" formControlName="mobile" name="phone_number" 
              [ngClass]="{ 'is-invalid': f.mobile.touched && f.mobile.invalid }"></international-phone-number>
              <div *ngIf="f.mobile.touched && f.mobile.invalid" class="help-block">
                  <div *ngIf="f.mobile.errors.required">Your mobile is required</div>
                  <div *ngIf="f.mobile.invalid">Your mobile is invalid</div>

              </div>

I try, the error will come out, but the ngClass couldnt be detect.

jek-bao-choo commented 4 years ago

@esoyke might fix this for you. https://github.com/esoyke/ngx-international-phone-number2 Put this there. He might help.