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