Skip to content

ShaileshInfyom/ng2-tel-input

 
 

Repository files navigation

Angular 2 wrapper for intl-tel-input

Installation

Run following command to install ng2-tel-input npm install ng2-tel-input

After installing, you need to add "intlTelInput.css" in your index.html.

In case of angular-cli, add path to css in your styles property in angular-cli.json. For example,
"styles": [
"styles.css",
"../node_modules/intl-tel-input/build/css/intlTelInput.css"]

Now add Ng2TelInputModule into your AppModule. For example,
import {Ng2TelInputModule} from 'ng2-intl-tel-input';

Once done, we are ready to use this library.

How to use with angular-cli

In order to use this directive, you need to add "ng2TelInput" directive with "[ng2TelInputOptions]" options to your text field. For example,
<input type="text"
ng2TelInput
[ng2TelInputOptions]="{initialCountry: 'in'}"
(hasError)="hasError($event)"
(ng2TelOutput)="getNumber($event)"
(countryChange)="onCountryChange($event)" />

N|Solid

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 54.6%
  • HTML 45.4%