Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

AngularJS ng-dblclick Directive

AngularJS ng-dblclick Instruction

AngularJS Reference Manual AngularJS Reference Manual


AngularJS Examples

Each time the mouse is double-clicked, the count variable is incremented by 1:

<

h1

ng-dblclick=

"count = count + 1"

ng-init=

"count=0"

Welcome

<

/h1

Try it »


Definition and Usage

ng-dblclick The directive tells AngularJS the action to take when the mouse double-clicks an HTML element.

ng-dblclick The directive does not override the element's native ondblclick event. When the mouse double-clicks,ng-dblclick both the expression and the native ondblclick event will be executed.


Syntax

<

element

ng-dblclick=

"expression"

<

/element

All HTML elements support this directive.


Parameter value

Value Description
expression The expression to execute after the element is double-clicked.

AngularJS Reference Manual AngularJS Reference Manual