Angular JS Events
Example:
<div ng-app="test" ng-controller="action">
<button ng-click="count = count+1 ">Click Me!</button>
<p>{{ count }}</p>
</div>
<script>
var app = angular.module('test', []);
app.controller('action', function($scope) {
$scope.count = 0;
});
</script>
- ng-blur
- ng-change
- ng-click
- ng-copy
- ng-cut
- ng-dblclick
- ng-focus
- ng-keydown
- ng-keypress
- ng-keyup
- ng-mousedown
- ng-mouseenter
- ng-mouseleave
- ng-mousemove
- ng-mouseover
- ng-mouseup
- ng-paste
Example:
<div ng-app="test" ng-controller="action">
<button ng-click="count = count+1 ">Click Me!</button>
<p>{{ count }}</p>
</div>
<script>
var app = angular.module('test', []);
app.controller('action', function($scope) {
$scope.count = 0;
});
</script>
No comments:
Post a Comment