AngularJS ng-mouseleave ھنایا

Definition and Usage

ng-mouseleave tells AngularJS what operation to perform when the mouse cursor leaves a specific HTML element.

The directive of AngularJS ng-mouseleave The directive does not override the original onmouseleave event of the element, both will be executed.

Example

Expression executed when the mouse cursor leaves the <div> element:

<div ng-mouseleave="count = count + 1" ng-init="count=0">Place the mouse above me! (Then move the mouse away...)</div>
<h1>{{count}}</h1>

Try It Yourself

Syntax

<element ng-mouseleave="expression</element>

All HTML elements support.

Parameters

Parameters Description
expression Expression executed when the mouse cursor leaves the element.