Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

AngularJS ng-mouseenter Directive

AngularJS ng-mouseenter Instruction

AngularJS Reference Manual AngularJS Reference Manual


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}}

<

/h1

Try 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"

<

/element

All HTML elements support this directive.


Parameter value

Value Description
expression The expression to execute when the mouse passes over the element.

AngularJS Reference Manual AngularJS Reference Manual