AngularJS ng-readonly 指令
定义和用法
ng-readonly 指令用于设置表单域(input 或 textarea) 的 readonly 属性。
如果 ng-readonly 属性的表达式返回 true 则表单域为只读。
ng-readonly 指令是能够在 true 和 假。 在 HTML 中,您不能设置
readonly 属性为 false (readonly 属性的存在使元素只读,无论其值如何) .
语法
<input ng-readonly="expression"></input>
<input> <textarea> 元素支持该指令。
参数值
| 值 | 描述 |
|---|---|
| expression | 表达式返回 true 则表单域为只读。 |

