Using angular 1.3.x, I have a parser in a directive assigned to an input.
When the user enters text into the directive the function that has been pushed to the $parses array is run. However when ngModel.$setViewValue(res);
is called the same parse function is immediately called which didn't happen in angular 1.2.x
ngModel.$parsers.push(function (inputValue) {
var originalVal = element.val();
// do some logic to originalVal and set it as new ViewValue if changed
if (originalVal != inputValue ) {
ngModel.$setViewValue(res);
ngModel.$render();
}
});
Any ideas?