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

AngularJS ng-mouseover Directive

AngularJS ng-mouseover Instruction

AngularJS Reference Manual AngularJS Reference Manual


AngularJS Examples

Execute an expression when the mouse pointer moves onto an element:

<

div

ng-mouseover=

"count = count + 1"

ng-init=

"count=0"

Move your mouse onto me!

<

/div

<

h1

{{count}}

<

/h1

Try it »


Definition and Usage

ng-mouseover The directive tells AngularJS the action to take when the mouse moves onto the specified HTML element.

ng-mouseover The directive does not override the element's native onmouseover event. When the event is triggered,ng-mouseover both the expression and the native onmouseover event will be executed.


Syntax

<

element

ng-mouseover=

"expression"

<

/element

All HTML elements support this directive.


Parameter value

Value Description
expression The expression to execute when the mouse moves onto the element.

AngularJS Reference Manual AngularJS Reference Manual