AngularJS ng-mouseup directive
AngularJSng-mouseupDirective
AngularJS Example
Expression executed when mouse button is released on an element:
<
div
ng-mouseup="count = count + 1"
ng-init=
"count=0"
Click me!
<
/div
<
h1
{{count}}
<
/h1Try it »
Definition and Usage
ng-mouseupDirective used to tell AngularJS what to do when the mouse button is released on a specified HTML element (click complete).
ng-mouseupThe directive will not override the element's native onmouseup event; when the event is triggered,ng-mouseupBoth the expression and the native onmouseup event will execute.
Mouse click execution order:
- Mousedown
- Mouseup
- Click
Syntax
<
element
ng-mouseup=
"expression"
<
/elementAll HTML elements support this directive.
Parameter value
| Value | Description |
|---|---|
| expression | Expression executed when the mouse click is released. |
AngularJS Reference Manual