Html DOM

Prev Tutorial Next Tutorial

Html DOM

AngularJS has directives for binding application data to the attributes of HTML DOM elements. The following directives are used to bind application data to the attributes of HTML DOM elements;

1ng-disabledTo Disables a given control of Html elements.
2ng-showTo Shows a given control of Html elements.
3ng-hideTo Hides a given control of Html elements.
4ng-clickTo perform AngularJS click event.

ng-disable Directive

ng-disable directive are use for binds AngularJS application data to the disabled attribute of HTML elements.


<div ng-app="">
<input type="checkbox" ng-model="enableDisableButton">Disable Button
<button ng-disabled="enableDisableButton">Click Me!</button>


Disable Button

ng-show Directive

ng-show directive are use for show or hide Html elements.

<div ng-app="">
<input type="checkbox" ng-model="hideme">Show Button
<button ng-show="hideme">Click Me!</button>

ng-hide Directive

ng-hide directive are use for hide or show an Html elements.


<div ng-app="">
<input type="checkbox" ng-model="hideme">Hide Button
<button ng-hide="hideme">Click Me!</button>

ng-click Directive

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


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

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

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

function clickController($scope) {
    $scope.count = 0;

Prev Tutorial Next Tutorial

Google Advertisements
Download Projects

Google Adsense Advertisements

Buy 3 Year Old Domain,, @$200

Buy This Ad Space @$50 per Month, Ad Size 300X250 Contact on: WhatsApp no. 8882538826

Yahoo Advertisements