Latest web development tutorials

AngularJS ng-mousedown instruction

AngularJS Reference Manual AngularJS Reference Manual

AngularJS examples

Executive expression on mouse down:

<Div ng-mousedown = "count = count + 1" ng-init = "count = 0"> Point me! </ Div>

<H1> {{count}} </ h1>

try it"

Definition and Usage

ng-mousedown instruction is used to tell AngularJS mouse operation when pressed on the specified HTML element to be executed.

ng-mousedown directive does not cover the native element onmousedown event, the event is triggered, ng-mousedownexpression and native onmousedown event will be executed.

Mouse click order execution:

  1. Mousedown
  2. Mouseup
  3. Click


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

All HTML elements support this instruction.

Parameter Value

value description
expression Expression mouse clicks performed.

AngularJS Reference Manual AngularJS Reference Manual