Closed alexandru-chirica closed 7 years ago
Please see https://github.com/hodgepodgers/ng-intl-tel-input/blob/master/CONTRIBUTING.md
Please make adjustments to the source code in the repository root, not the dist
directory.
Hello all, I have done the necessary changes , now if the old country's phone number's length is less than new selected country's phone number length, then only my model will get updated. or else the same issue still exists. Dont know if I have missed something.
I tried with changing
angular.element($window).on('countrychange', function () { if(attr.selectedCountry) { setSelectedCountryData(attr.selectedCountry); } if (!ctrl.$viewValue || ctrl.$viewValue === elm.val()) { return; } ctrl.$setViewValue(elm.val()); });
Also,
if (attr.selectedCountry) { setSelectedCountryData(attr.selectedCountry); angular.element($window).on('countrychange', handleCountryChange); scope.$on('$destroy', cleanUp); }
but in both the cases same issue. I have downgraded "intl-tel-input" to 7.0.2. Is that is stopping this?
This is method of valdiating the number on countrychange event. This is in regards to issue #85 .