Angularjs

Angular JS Events

ng-click directive defines Angular JS click events.

Example:


<div ng-app="" ng-controller="MyController">
  <button ng-click= "test={{message}}" >Submit</button>
<div>{{test}}</div>
</div>

Hiding HTML element:

you can use ng-hide directive to make visible true or False for a HTML element.

Example:


<div ng-app="" ng-controller="MyController">
  <button ng-click= "test={{message}}" ng-hide=true>Submit</button>
<div>{{test}}</div>
</div>

ng-hide=true, it will make the element invisible

ng-hide=false, it will make the element visible.

© 2015, www.techkatak.com. All rights reserved.