Angularjs Examples

AJS Examples


AngularJS ng-MouseUp Directive

The AngularJS ng-mouseup directive is used to attach specific functionality on mouse up event.

Syntax

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

AngularJS ng-MouseUp Directive Example

<html>
<head>
<script src= "http://ajax.googleapis.com/ajax/libs/angularjs/1.2.26/angular.min.js"></script>
<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 Up Event Demo');
    };

})
</script>
</head>
<body>
<div ng-app="myApp" ng-controller="homeCtrl">
    <div ng-mouseup="alert();" style="background:#3dd33d;">
        Tech Strikers
    </div>
</div>

</body>
</html>
See Live Example