Friday, August 26, 2016

Angular JS Events

Angular JS Events

  1. ng-blur
  2. ng-change
  3. ng-click
  4. ng-copy
  5. ng-cut
  6. ng-dblclick
  7. ng-focus
  8. ng-keydown
  9. ng-keypress
  10. ng-keyup
  11. ng-mousedown
  12. ng-mouseenter
  13. ng-mouseleave
  14. ng-mousemove
  15. ng-mouseover
  16. ng-mouseup
  17. 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