Angularjs Examples

AJS Examples

AngularJS ng-MouseLeave Directive

The AngularJS ng-mouseleave directive is used to attach specific functionality on mouse leave event.


<button ng-mouseleave="callFunction()"> 

AngularJS ng-MouseLeave Directive Example

<script type="text/javascript">
//Defining Controller Using Standard Javascrip Object Constructor
var app = angular.module('myApp', []);
app.controller('homeCtrl', function ($scope) {
    $scope.alert = function () {
        alert('Mouse Leave Event Demo');

<div ng-app="myApp" ng-controller="homeCtrl">
    <div ng-mouseleave="alert();" style="background:#3dd33d;">
        Tech Strikers

See Live Example