The ng-disabled directive binds AngularJS application data to the disabled attribute of HTML elements. AngularJS has directives for binding application data to the attributes of HTML DOM elements.
<div ng-app=”myApp”>
<p>
<input type=”checkbox” ng-model=”myStatus”>Enable/Disable Button
</p>
<p>
<button ng-disabled=”myStatus”>Save</button>
</p></div>
<button ng-disabled=”myStatus”>Save</button>
</p></div>
The ng-disabled directive binds the application data “myStatus” to the HTML button’s disabled attribute.
The ng-model directive binds the value of the HTML checkbox element to the value of “myStatus”.
If the value of “myStatus”.evaluates to true, the button will be disabled.