Jawad
Jawad

Reputation: 101

How to use ngx-intl-tel-input library in Angular 15 and above

I want to import library ngx-intl-tel-input to validate phone number with the country code in reactiveForm module and when change country code the phone number.

I want to use ngx-intl-tel-input for phone number vaildate with the country code and set phone number on edit patch.

It's not mandatory to be dependent on ngx-intl-tel-input specific. If any other working for angular 15 and above please help me out.

My versioning details below.

 => npm = 8.19.4,
 => node = 16.20.1
 => Angular CLI: 15.2.10
Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1501.6
@angular-devkit/build-angular   15.1.6
@angular-devkit/core            15.1.6
@angular-devkit/schematics      15.2.10
@angular/cdk                    15.2.9
@schematics/angular             15.2.10
rxjs                            7.5.7
typescript                      4.8.4

I have tried installing ngx-intl-tel-input-gg(which does shows that it supports angular 15 and 16), angular-phone-number-input. But my requirement is to use the library which smooth installs the dependencies and does not require npm i some-library -f(forfully flag) to install it. I don't want to use -f flag. Because, it might break the pipelines on development server when deploying the changes because in the pipelines.yml it's npm install and not npm install -f.

NOTE: I don't have Angular materials, so I will not be using ngx-mat-intl-tel-input.

Upvotes: 1

Views: 1757

Answers (0)

Related Questions