Issue: If the value of the input's ng-model is numeric (phone is stored and coming back as a number from db), a "value.replace is not a function" error is thrown in the removeDivisors function.
Quick Resolution: Add the following line at the top removeDivisors():
value = typeof value === 'String'? value: value.toString();
Issue: If the value of the input's ng-model is numeric (phone is stored and coming back as a number from db), a "value.replace is not a function" error is thrown in the
removeDivisors function
.Quick Resolution: Add the following line at the top
removeDivisors()
:value = typeof value === 'String'? value: value.toString();