AngularJS ng-mousedown
Directive
AngularJS Example
Execute an expression when the mouse button is pressed:
Definition and Usage
The ng-mousedown directive is used to tell AngularJS what to do when a mouse button is pressed over a specified HTML element.
The ng-mousedown directive does not override the element's native onmousedown event. When the event is triggered, both the ng-mousedown expression and the native onmousedown event will be executed.
The sequence of mouse click events:
Mousedown
Mouseup
Click
Syntax
This directive is supported by all HTML elements.
Parameter Values
Value | Description |
---|---|
expression | The expression to be executed when the mouse is clicked. |