I want to update the text value when the value is changed using some method, the method should not call when I still print the text, but when I exit the text field or change it through the script code:
<input type="text" ng-model ="model.value" ng-change = "update()"/>
what the update () method should contain,
what I tried: wrote a directive for this text box and
scope.$watch('model', function(nval,oval){
if ((oVal === undefined) && (nVal != undefined)){
update()
}
});
It is called the first time, but not every time the model value changes.
I want to call the update method whenever the value of model.value changes, but not when entering text
source
share