AngularJS ng-mouseup directive

Definition and Usage

ng-mouseup tells AngularJS what operation to perform when the mouse click is completed.

The directive of AngularJS ng-mouseup Directives do not override the original onmouseup event of the element, both will be executed.

The order of mouse clicks is: Mousedown (mouse down) Mouseup (mouse up) Click (click)

Example

Expression executed when the mouse click is completed:

<div ng-mouseup="count = count + 1" ng-init="count=0">Click me!</div>
<h1>{{count}}</h1>

Try It Yourself

Syntax

<element ng-mouseup="expression</element>

All HTML elements support.

Parameters

Parameters Description
expression Expression executed when the mouse click is completed.