WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

AngularJS ng-mousedown Directive


Example

Execute an articulation when a mouse click occurs:

<div ng-mousedown="count = tally + 1" ng-init="count=0">Click me!</div>

<h1>{{count}}</h1>
Try it yourself »

Definition and Usage

The ng-mousedown order guides AngularJS when a mouse catch is tapped on the particular HTML element.

The ng-mousedown order from AngularJS won't abrogate the component's unique onmousedown occasion, both will be executed.

The request of a mouse click is:

1. Mousedown

2. Mouseup

3. Click


Syntax

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

Supported by all HTML elements.


Parameter Values

Value Description
expression An articulation to execute when a mouse catch is clicked.