AngularJS ng-mouseupDirectives
AngularJS Example
Execute an expression when the mouse button is released on the element:
<div ng-mouseup="count = count + 1" ng-init="count=0">Click me!</div>
<h1>{{count}}</h1>
<h1>{{count}}</h1>
Try it Yourself »
Definition and Usage
ng-mouseupThe directive tells AngularJS what to do when the mouse button is released on the specified HTML element (when a click is completed).
ng-mouseupThe directive does not override the element's native onmouseup event. When the event is triggered,ng-mouseupboth the expression and the native onmouseup event will be executed.
Order of mouse click execution:
- Mousedown
- Mouseup
- Click
Syntax
<element ng-mouseup="expression"></element>
All HTML elements support this directive.
Parameter Value
| Value | Description |
|---|---|
| expression | The expression executed when the mouse button is released at the completion of a mouse click. |
Other Extensions
AngularJS Reference Manual