Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
gauravsoni119 authored Nov 6, 2017
1 parent 58e5a03 commit fe3d245
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,21 @@ 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,
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"]
__
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)"
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](https://github.com/gauravsoni119/ng2-tel-input/blob/master/example.png)

0 comments on commit fe3d245

Please sign in to comment.