AngularJS ng-readonly Instruction
AngularJS Examples
Set the input field to read-only:
Readonly:
<
input
type=
"checkbox"
ng-model=
"all"
<
br
<
input
type=
"text"
ng-readonly=
"all"Try it »
Definition and Usage
ng-readonly The directive sets the readonly attribute of a form field (input or textarea).
If both the ng-readonly If the expression of the attribute returns true, the form field is read-only.
Syntax
<
input
ng-readonly=
"expression"
<
/input
Parameter value
| Value | Description |
|---|---|
| expression | If the expression returns true, the form field is read-only. |
AngularJS Reference Manual