Binding the number with country code directly to the model
Opened this issue · 5 comments
Hi,
When I enter a number into an input field with this directive, it would be nice if the number were to be bound with the country dial code directly to the model. Is there an option for this already?
What I mean is, say I have the following input:
It would be nice if the value bound to the model could automatically be "+46723135423" but instead I get "0723135423". I have to call intlTelInput('getNumber') to get the value and it's frustrating to have to do this manually everywhere in the code.
Would it be alright if I implemented an option for this and made a pull request? (I'm new to github, not sure yet about the etiquette of making pull-requests)
Thanks!
Hi meldinoor, did you ever get around that issue? If so, where can I find your solution?
Hi Jordumus. I did fix it, but never got around to putting up a pull request. It's actually quite a small change, but I can make it available for you if you like.
Give me a minute and I'll fork the project
Just set this option:
ipnConfig.nationalMode = false;