Ng-DoubleClick-2

 

In this example we can increase the value of count by 1 if we will double click on the button which is intialize to 0.

 
 
 
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Welcome to LearnKode - A code learning platform</title> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.2/angular.min.js"></script> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"> </head> <body ng-app="clickExample"> <div ng-controller="ExampleController"> <button ng-dblclick="count=count+1">Increment (on double click)</button> {{count}} </div> <script> var app = angular.module("clickExample", []); app.controller('ExampleController', ['$scope', function ($scope) { $scope.count = 0; }]); </script> </body> </html>
Output