In this example of the ng-disabled directive we have a textbox and upon the textbox we have a link toggle when you click on this it will disable the textbox and the link below the textbox both, click again to make both enable.

<!DOCTYPE html> <html xmlns=""> <head> <title></title> <script src=""></script> </head> <body ng-app> <div ng-init="count=1;inactive=false"> <a ng-click="inactive = !inactive" href="">Toggle Active</a> Disable={{inactive}} <br><input type="number" ng-disabled="inactive" ng-model="count"> <br><a ng-click="inactive || (count=count + 1)" href="" style="">click to Increase count</a> {{count}} </div> </body> </html>