AngularJs ng-mouseup events

AngularJs ng-mouseup events

The AngularJs ng- mouseup is use to specify the mouseup event features.

The demo link click to view http://embed.plnkr.co/SKvAaI/preview

The HTML code-sample:

<button type="button" ng-mouseup="mouseup(IsDisplay)">NG-MOUSEUP</button>

The AngularJs code-sample:

var app = angular.module('myApp', []);
app.controller('ngMouseupCtrl', ["$scope", function ($scope) {
    $scope.domain = "code-sample.com";
    $scope.IsDisplay = false;
    $scope.mouseup = function (clicked) {
        alert("My mouseup function is called.");
        $scope.IsDisplay = clicked == true ? false : true;
    };
}]);

The AngularJs and HTML code-sample:

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>angularjs ng-mouseup</title>
    <script src="https://code.angularjs.org/1.4.1/angular.js"></script>
    <script>
        var app = angular.module('myApp', []);
        app.controller('ngMouseupCtrl', ["$scope", function ($scope) {
            $scope.domain = "code-sample.com";
            $scope.IsDisplay = false;
            $scope.mouseup = function (clicked) {
                alert("My mouseup function is called.");
                $scope.IsDisplay = clicked == true ? false : true;
            };
        }]);
    </script>
</head>
<body ng-app="myApp">
    <div ng-controller="ngMouseupCtrl">
        <div><h2>The ng-mouseup in AngularJs</h2> </div>
        <div>
            Domain name: <input type="text" ng-model="domain"> <button type="button" ng-mouseup="mouseup(IsDisplay)">NG-MOUSEUP</button>
        </div>
        <div>
            <div ng-show="IsDisplay"> My MOUSEUP function is called. <br /><h3 style="color:green;">Display User detail: {{domain}} </h3></div>
        </div>
    </div>
</body>
</html>




ANIL SINGH

Hey! I'm Anil Singh. I author this blog. I'm Active Blogger, Programmer. I love learning new technologies, programming, blogging and participating the forum discussions more...
My Blogs - http://www.code-sample.com and http://www.code-sample.xyz
My Books - Google Amazon and Flipkart Book Store!

You Might Also Like
Post a Comment
www.code-sample.com/. Powered by Blogger.
ASK Questions
SQL Server NodeJs TypeScript JavaScript Angular SQL Server My Book