ng-change even not firing on text box backspace button press.
ng-change works fine on changing the value example pressing numbers or any character from keyboard but not on backspace button press
ng-change even not firing on text box backspace button press.
ng-change works fine on changing the value example pressing numbers or any character from keyboard but not on backspace button press
try like this.
var app = angular.module("app",[])
app.controller('ctrl',['$scope', function($scope){
$scope.test = function(model){
console.log(model);
}
}]);
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.22/angular.min.js"></script>
<div ng-app="app" ng-controller="ctrl">
<div class="item item-checkbox">
<input type="text" ng-model="model" ng-change="test(model)">
{{model}}
</div>
The ngChange expression is only evaluated when a change in the input value causes a new value to be committed to the model.
It will not be evaluated:
Please send code or example so that I can help you more.... Refer: https://docs.angularjs.org/api/ng/directive/ngChange