Latest web development tutorials

AngularJS ng-disabled instruction

AngularJS Reference Manual AngularJS Reference Manual


AngularJS examples

Disable or enable input box:

Disable form input fields: <input type = "checkbox" ng-model = "all">
<Br>
<Input type = "text" ng -disabled = "all">
<Input type = "radio" ng -disabled = "all">
<Select ng-disabled = "all ">
<Option> Female </ option>
<Option> Male </ option>
</ Select>

try it"

Definition and Usage

ng-disabled instruction set disabled attribute form input fields (input, select, or textarea).

If ng-disabled in the expression returns true if the form fields will be disabled.


grammar

<Input ng-disabled = "expression "> </ input>

<Input>, <select>, and <textarea> element supports the instruction.


Parameter Value

value description
expression If the expression returns true, the element is set to add a disabled attribute.

AngularJS Reference Manual AngularJS Reference Manual