Angularjs Event

Advertisements

AngularJS Validation AngularJS Tutorial

Angularjs Event

AngularJS have its own event directive to handle DOM events like mouse clicks, moves, keyboard presses, change events etc. Following are the event directive of AngularJS;

  • ng-click
  • ng-dbl-click
  • ng-mousedown
  • ng-mouseup
  • ng-mouseenter
  • ng-mouseleave
  • ng-mousemove
  • ng-mouseover
  • ng-keydown
  • ng-keyup
  • ng-keypress
  • ng-change

ng-click Directive

ng-click directive are use for perform an AngularJS click event.

Example

<div ng-app="" ng-controller="clickController">

<button ng-click="count = count + 1">Increment!</button>

<p>{{ count }}</p>

</div>
<script>
function clickController($scope) {
    $scope.count = 0;
}
</script>

Output

{{ count }}

ng-mouseenter Directive

ng-mouseenter directive are use for perform an AngularJS event when mouse hover on any Html elements.

Example

<div ng-app="" ng-controller="clickController">

<button ng-mouseenter="count = count + 1">Touch Me!</button>

<p>{{ count }}</p>

</div>
<script>
function clickController($scope) {
    $scope.count = 0;
}
</script>

AngularJS Validation AngularJS Tutorial

Advertisements

Buy This Ad Space @$20 per Month, Ad Size 600X200 Contact on: hitesh.xc@gmail.com or 9999595223

Pure VPN Privide Lowest Price VPN Just @ $1.65. Per Month with Non Detected IP Lowest Price Non Detected IP VPN

Magenet is best Adsense Alternative here we earn $2 for single link, Here we get links ads. Magenet

Download Projects

Google Advertisements


Buy Websites 9999595223

Buy College Projects with Documentation Contact on whatsapp 9999595223. Contact on: hitesh.xc@gmail.com or 9999595223 Try this Keyword C++ Programs

Advertisements