I have an angularJS directive for a masked input, that when a certain condition is met, I want to remove the mask. I was getting errors for the scope.ngModel being undefined in the code, however when I did a console.log(scope.ngModel) I was getting a value. I decided to put in a watch and surprisingly it seems that the ngModel goes through several assignment iterations before getting the actual model value.I have an angularJS directive for a masked inpu