AngularJS ng-blur Instruction
AngularJS Examples
Execute an expression when the input field loses focus (onblur):
<
input
ng-blur="count = count + 1"
ng-init=
"count=0"
/
<
h1
{{count}}
<
/h1Try it »
Definition and Usage
ng-blur The directive tells AngularJS the expression to execute when an HTML element loses focus.
in AngularJS ng-blur The directive does not override the native onblur event. If the event is triggered,ng-blur both the expression and the native onblur event will be executed.
Syntax
<
element
ng-blur=
"expression"
<
/element
Parameter value
| Value | Description |
|---|---|
| expression | The expression to execute when focus is lost. |
AngularJS Reference Manual