Set a default country dynamically
Opened this issue · 0 comments
dant672 commented
Is it possible to set the default country by passing through the country iso2 model. I have tried the following strategies:
- Assign the user country iso code to the default country option
<input class="schedule-input" type="text" name="phone" id="phone" international-phone-number ng-model="newAppointment.phone" ng-click="checkCountry()" default-country="{{user_country.iso}}" />
2) Set the default country in the controller:
angular.element('#phone').intlTelInput("selectCountry", 'gb')
angular.element('#phone').intlTelInput("setCountry", 'gb')
(tried both selectCountry and setCountry to no avail)
Any feedback would be helpful