ngChange (directive)

Improve this Doc View Source ngChange

  1. directive in module ng

Evaluate the given expression when the user changes the input. The expression is evaluated immediately, unlike the JavaScript onchange event which only triggers at the end of a change (usually, when the user leaves the form element or presses the return key). The expression is not evaluated when the value change is coming from the model.

Note, this directive requires ngModel to be present.

Directive Info

  • This directive executes at priority level 0.

Usage

  • as attribute:
    <input
      ng-change="">
    ...
    </input>

Arguments

Param Type Details
ngChange expression

Expression to evaluate upon change in input value.

© 2010–2016 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://code.angularjs.org/1.2.32/docs/api/ng/directive/ngChange

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部