AngularJS ng-dblclickDirective

AngularJS 参考手册AngularJS Reference


AngularJS Examples

On each mouse double-click, the variable count is incremented by 1:

<h1 ng-dblclick="count = count + 1" ng-init="count=0">Welcome</h1>

Try it Yourself »

Definition and Usage

ng-dblclickThe directive is used to tell AngularJS what operation to perform when the mouse double-clicks on an HTML element.

ng-dblclickThe directive does not override the element's original ondblclick event; when the mouse double-clicks,ng-dblclickboth the expression and the original ondblclick event will be executed.


Syntax

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

All HTML elements support this directive.


Parameter Values

Value Description
expression The expression that is executed when the element is double-clicked.

AngularJS 参考手册AngularJS Reference

Other Extensions