mareczek / international-phone-number

AngularJS directive implementing intl-tel-input (https://github.com/Bluefieldscom/intl-tel-input)
139 stars 131 forks source link

Preventing apply and digest conflicts #93

Open morfin opened 8 years ago

morfin commented 8 years ago

When I try to trigger the change event on phone field, I was getting an "$apply already in progress" issue. This fix prevents that. Not sure if this is the best approach though.

mebibou commented 8 years ago

You should make the change in the coffee file and then run grunt to compile in the releases folder.

Also, why just not doing if (!$scope.$$phase) ?

vmeira commented 7 years ago

Your solution is not considered the best approach. Might want to take a look at this: https://stackoverflow.com/questions/12729122/angularjs-prevent-error-digest-already-in-progress-when-calling-scope-apply