Is there a way to access the element with the ng-disabled attribute inside the function without passing it as a parameter?
Here is the HTML element:
<input class="needsDisabling" ng-disabled="isFieldDisabled()" type="text">
The isFieldDisabled function in controller:
What is the method to access the element with the ng-disabled attribute within this function?
$scope.isFieldDisabled = function () {
// What can I do to access the element with the ng-disabled attribute here?
// if (element has class "needsDisabling")
// return true;
}
I am seeking an alternative approach to passing the element as a parameter in the function.