. :
<a href="" id="trash" class="cntrbtn remove pull-left disabled" ng-click="disabled||usertaskctrl.removeTasksToArchive()" ng-disabled="disabled">remove</a>
$scope.disabled = true;
if/else disabled $scope.disabled = false;
I give you an example with a tag <a></a>this button operation is simple.
And in the ng-click button ng-click="disabled||usertaskctrl.removeTasksToArchive()", a test is first performed before clicking on any function.
source
share