![]() |
VOOZH | about |
The ng-mouseleave directive in AngularJS is used to apply custom behavior when a mouse-leave event occurs on a specific HTML element. It can be used to show a popup alert when the mouse leaves a specific position in an HTML element. It is supported by all HTML elements.
Syntax:
<element ng-mouseleave="expression">
content ...
</element>
Parameter:
Example 1: This example describes the ng-mouseleave Directive in AngularJS.
Output:
Example 2: This example describes the ng-mouseleave Directive in AngularJS, by specifying the <input> tag that has the ng-mouseleave directive containing the alert() function which helps to display the data in the alert message.
Output: