Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Added instruction for overloading defaults in angulars config phase and added new options
  • Loading branch information
mareczek committed Sep 11, 2015
1 parent fc298fa commit 33a2c57
Showing 1 changed file with 24 additions and 10 deletions.
34 changes: 24 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,30 @@ Same as in source project (https://github.com/Bluefieldscom/intl-tel-input)

Sneak preview:
```coffeescript
options =
autoFormat: true
autoHideDialCode: true
defaultCountry: ''
nationalMode: false
numberType: ''
onlyCountries: undefined
preferredCountries: ['us', 'gb']
responsiveDropdown: false
utilsScript: ""
allowExtensions: false
autoFormat: true
autoHideDialCode: true
autoPlaceholder: true
customPlaceholder: null
defaultCountry: ""
geoIpLookup: null
nationalMode: true
numberType: "MOBILE"
onlyCountries: undefined
preferredCountries: ['us', 'gb']
utilsScript: ""
```

Global configuration (in angulars config phase)
---
There is a constant `ipnConfig` available in which all of the defaults are configured.
To change the defaults simply use the `ipnConfig` object:
```coffeescript
angular.module('app')
.config (ipnConfig) ->
ipnConfig.defaultCountry = 'pl'
ipnConfig.preferredCountries = ['pl', 'de', 'fr', 'uk', 'es']

```

Usage
Expand Down

0 comments on commit 33a2c57

Please sign in to comment.