AngularJs ng-mousedown event example


AngularJs ng-mousedown event example : AngularJs ng-mousedown event example binds mousedown event with elements in html.


Syntax : AngularJs ng-mousedown event

The below example shows the ng-mousedown event directive.

Example

<!DOCTYPE html>
<html lang="en">
<head>
    <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.4.3/angular.min.js"></script>
</head>

<body>
<div ng-app="" ng-init="i=1">
    <button ng-mousedown="i = i+1">Mouse Down(On Mousedown)</button>
     Counter = {{i}}
</div>
</body>
</html>

Try it »

AngularJs ng-mousedown event example

AngularJs ng-mousedown event example


Advertisements

Add Comment

📖 Read More