AngularJS ng-model-options Instruction
Example
Bind the value of the input field to a scope variable when focus is lost:
Try it »
Definition and Usage
ng-model-options The directive binds HTML form elements to scope variables.
You can specify when the data binding is triggered, or how many milliseconds to wait. See the descriptions below for parameter settings.
Syntax
<
element
ng-model-options=
"option"
<
/element,
Parameter value
| Value | Description |
|---|---|
| option | Specifies the rules for data binding, as follows: |
{updateOn: '*event*'}规则指定事件发生后绑定数据
{debounce : 1000} 规定等待多少毫秒后绑定数据
{allowInvalid : true\|false} 规定是否需要验证后绑定数据
{getterSetter : true\|false} 规定是否作为 getters/setters 绑定到模型
{timezone : '0100'} 规则是否使用时区 |
AngularJS Reference Manual