I am currently working with AngularJS and have run into an issue when combining ng-blur with ng-readonly. Even though ng-readonly is set to true, ng-blur still triggers (if the input field is clicked and then somewhere else is clicked).
In this example, ng-blur will still trigger to increment the counter.
Code snippet in app.js:
$scope.counting = function(){
$scope.count++;
}
Code snippet in index.html:
<input
ng-blur="counting()"
placeholder="sample"
ng-readonly="true"
>
Question: How can I prevent ng-blur from triggering when the ng-readonly condition is true?