AngularJS ng-mousemove Instruction
AngularJS Examples
Execute an expression when the mouse pointer moves over an element:
<
div
ng-mousemove=
"count = count + 1"
ng-init=
"count=0"
Move the mouse over me!
<
/div
<
h1
{{count}}
<
/h1
Try it »
Definition and Usage
ng-mousemove The directive tells AngularJS the action to take when the mouse moves over an HTML element.
ng-mousemove The directive does not override the element's native onmousemove event. When the event is triggered,ng-mousemove both the expression and the native onmousemove event will be executed.
Syntax
<
element
ng-mousemove=
"expression"
<
/element
All HTML elements support this directive.
Parameter value
| Value | Description |
|---|---|
| expression | The expression to execute when the mouse moves over the element. |
AngularJS Reference Manual