I\'ve looked all over the web including several stack overflow examples for a solution to the question. To be specific, I tried this:
I didn't like any of the provided answers as they all clutter the global scope with the isDisabled
variable, why not do it this way instead?
.
$scope.disableButton = function($event) {
$event.currentTarget.disabled = true;
};
if if you need to submit a form before the disable.
this code is not tested
.
$scope.disableFormSubmitButton = function($event) {
$($event).find('[type=submit]').prop('disabled',true);
};