Home
Tutorials
Microsoft Technologies Tutorials
Java Programming Tutorials
Web Designing Tutorials
Script Programming Tutorials
Database Programming Tutorials
Mobile Technologies Tutorials
Other Programming Tutorials
Examples
Articles
Tools
News
AngularJS ng-click Event Example
Keywords : Angularjs ng click event object example, Angularjs button click event using ng-click directive example, Angularjs raside ng-click event on button click example, Angularjs ng-click directive
Example
<!DOCTYPE html> <html> <head> <title> AngularJs ng-click Event Example </title> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script> <script type="text/javascript"> var app = angular.module('ngclickApp', []); app.controller('ngclickCtrl', function ($scope) { $scope.clkcount = 0; }); </script> </head> <body> <div ng-app="ngclickApp" ng-controller="ngclickCtrl"> <h2>AngularJs ng-click Events Example</h2> <input type="button" style="cursor:pointer" value="Click Here" ng-click ="clkcount=clkcount+1" /><br /><br /> <span style="color:Red">Number of Times you Clicked: {{clkcount}}</span> </div> </body> </html>
Click Here to See Result
Result
Previous
Next