AngularJS ng-mouseoverDirective
AngularJS Example
Execute an expression when the mouse pointer moves over an element:
<div ng-mouseover="count = count + 1" ng-init="count=0">Move the mouse over me!</div>
<h1>{{count}}</h1>
<h1>{{count}}</h1>
Try it Yourself »
Definition and Usage
ng-mouseoverThe directive tells AngularJS what action to perform when the mouse pointer moves over the specified HTML element.
ng-mouseoverThe directive does not override the element's native onmouseover event. When the event is triggered,ng-mouseoverBoth 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 over the element. |
Other Extensions
AngularJS Reference