Try it
Javascript
Jquery
Angular
Learn Angular
Learn Javascript
Learn Bootstrap
Learn jQuery
Ng-Mouseover-1
Ng-init intialize the value of count variable to 0.Count is increase by 1 each time when we over the mouse on the button.
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.2/angular.min.js"></script> </head> <body ng-app> <div> <button ng-mouseover="count = count + 1" ng-init="count=0"> Increment (when mouse is over) </button> count: {{count}} </div> </body> </html>
Output
×
Save This try
Title
Description
Ng-init intialize the value of count variable to 0.Count is increase by 1 each time when we over the mouse on the button.