I want to add a new function to the ng-blur of all input/textarea fields. The input fields and textarea's has a existing ng-blur in the html and I want to add a new function to the existing ng-blur within the controller.
I tried to add it with setAttribute, but that override the existing ng-blur functions.
const formElems= iElem[0].querySelectorAll('input, textarea');
formElems[0].setAttribute('data-ng-blur', 'newFunction()');
$compile(angular.element(formElems[0]))($scope);
I want to extend the functions inside ng-blur, but not directly in the HTML.
How to add new functions inside the controller to the ng-blur of all input and textarea's and keep the current functions?