AngularJs events with examples

AngularJs Events

AngularJs events are used to handle the dom events. Like mouse events,  key events.

following events are providing by angular js which makes our task easy.

  •     ng-show
  •     ng-click
  •     ng-blur
  •     ng-change
  •     ng-copy
  •     ng-paste
  •     ng-cut
  •     ng-dblclick
  •     ng-focus
  •     ng-keydown
  •     ng-keypress
  •     ng-keyup
  •     ng-mousedown
  •     ng-mouseenter
  •     ng-mouseleave
  •     ng-mousemove
  •     ng-mouseover
  •     ng-mouseup


Angular JS ng-show directive

<script src=""></script>
<body ng-app>

Show HTML: <input type="checkbox" ng-model="val">

<div ng-show="val">

<p>Welcome to</p>


Angular JS ng-click directive

<script src=""></script>
<body ng-app>
<button ng-click="c = c + 1" ng-init="c=0">OK</button>
<p>Button Count is {{c}} .</p>

AngularJS ng-hide Directive

<script src=""></script>
<body ng-app>

<input type="text" ng-model="x">

<div ng-hide="x">

<p>Please type something in input box and HIDE ME</p>



Angular JS ng-blur directive

<element ng-click="expression"></element>


Angular $HTTP sevice

Subscribe Codebun on youtube

Leave a Comment

Your email address will not be published.