Home » AngularJS DOM

AngularJS HTML DOM

In AngularJS, some directives can be used to bind application data to attributes of HTML DOM elements.

These directives are:

Directive Description
ng-disabled It disables a given control.
ng-show It shows a given control.
ng-hide It hides a given control.
ng-click It represents an AangularJS click event.

ng-disabled directive:The ng-disabled directive binds AngularJS application data to the disabled attribute of HTML elements. In the below code, it binds a model to a checkbox.

ng-show directive: The ng-show directive shows or hides an HTML element. In the below code, it binds a model to a checkbox.

ng-hide directive: The ng-hide directive hides or shows an HTML element. In the below code, it binds a model to a checkbox.

ng-click directive: The ng-click directive counts the total clicks an HTML element. In the below code, it binds a model to a checkbox.


Let’s take an example to deploy the all above directives and test the variations:

See this example:

Test it Now

Next TopicAngularJS Forms

You may also like