AngularJS ng-mouseover directive
Definition and Usage
ng-mouseover
AngularJS tells AngularJS what operation to perform when the mouse cursor moves over a specific HTML element.
The directive of ng-mouseover
The directive does not override the original onmouseover event of the element, both will be executed.
Example
An expression to be executed when the mouse cursor moves over the <div> element:
<div ng-mouseover="count = count + 1" ng-init="count=0">Put the mouse over me!</div> <h1>{{count}}</h1>
Syntax
<element ng-mouseover="expression</element>
All HTML elements support.
Parameters
Parameters | Description |
---|---|
expression | An expression to be executed when the mouse cursor moves over an element. |