In this example we can increase the count1 and count2 variable on click of anchor element and button respectively.isCheck is a variable with ng-model directive which set the value of checkbox to isCheck variable.If isCheck is true it will not increase count2 because ng-disabled directive disable the button.

<!DOCTYPE html> <html xmlns=""> <head> <title>Welcome to LearnKode - A code learning platform</title> <script src=""></script> <link rel="stylesheet" href=""> </head> <body ng-app="clickExample"> <div ng-controller="ExampleController"> Stop button counts: <input type="checkbox" ng-model="isCheck" /><br /> <a href="javascript:void:(0)" ng-click="count1=count1+1">Anchor</a> <input type="button" ng-disabled="isCheck" ng-click="count2=count2+1" value="Button" /><br /> Anchor Clicks: {{count1}}<br /> Button Clicks: {{count2}} </div> <script> var app = angular.module("clickExample", []); app.controller('ExampleController', ['$scope', function ($scope) { $scope.count1 = 0; $scope.count2 = 0; }]); </script> </body> </html>