AngularJS Developer Question:

What is ng-disabled directive?

Tweet Share WhatsApp

Answer:

ng-disabled directive disables a given control.

In below example, we've added ng-disabled attribute to a HTML button and pass it a model. Then we've attached the model to an checkbox and can see the variation.

<input type = "checkbox" ng-model = "enableDisableButton">Disable Button
<button ng-disabled = "enableDisableButton">Click Me!</button>

Download AngularJS Developer PDF Read All 125 AngularJS Developer Questions
Previous QuestionNext Question
Tell me what is string interpolation in Angular.js?Tell me when should you use an attribute versus an element?