In this example we have a button and a anchor link. When you click on the Anchor link it will show Anchor clicks below it and when you click on the button it will show the button clicks. We have a checkbox to disable the button clicks when the checkbox is checked the button will disable.
<!DOCTYPE html> <html xmlns=""> <head> <title></title> <script src=""></script> </head> <body ng-app> <div> <h4>Click me to toggle: <input type="checkbox" ng-model="isChecked"></h4> <a href="" ng-disabled="isChecked" ng-click="anchorClicks=anchorClicks+1">ANCHOR</a> <button ng-disabled="isChecked" ng-click="buttonClicks=buttonClicks+1">BUTTON</button> <hr /> <p>Anchor Clicks: {{anchorClicks}}</p> <p>Button Clicks: {{buttonClicks}}</p> </div> </body> </html>