AngularJS ng-dblclick
Directive
AngularJS Example
Increment the variable count by 1 every time the mouse is double-clicked:
<h1 ng-dblclick="count = count + 1" ng-init="count=0">Welcome</h1>
Definition and Usage
The ng-dblclick directive is used to tell AngularJS what to do when the mouse double-clicks on an HTML element.
The ng-dblclick directive does not override the element's original ondblclick event. When the mouse is double-clicked, both the ng-dblclick expression and the original ondblclick event will be executed.
Syntax
This directive is supported by all HTML elements.
Parameter Values
Value | Description |
---|---|
expression | The expression to be executed after the element is double-clicked. |