1.

AngularJS HTML DOM

Answer»

AngularJS HTML DOM
AngularJS has number of directives that are used to binding application data to attributes of HTML DOM elements. Below are the different DIRECTIVE which are used for binding application data.

The ng-disabled Directive


We use ng-disabled directive to binds AngularJS application data to disabled attributes of HTML elements. Below is the example which helps you understand ng-disabled directive:-


AngularJS ng-disabled
Below are the 3 point for above images
(1)As in above figure ng-disabled directive binds the application data myTestSwitch to the HTML BUTTON disabled attribute.
(2)And ng-model directive binds the value of HTML checkbox element to the value of myTestSwitch.
(3)If values of myTestSwitch evalutes to true the button will be disabled.

The ng-show Directive


We use this ng directive to either SHOWS or hides an HTML elements. Below example will helps you to under that:-


AngularJS ng-show
In above image we will use ng-show to DISPLAY some value by putting as "true" then it is visible if you PUT as "false" it will hide the values

The ng-hide Directive


As we use ng-show in similar way we will use ng-hide directive to hide some values


AngularJS ng-hide


Discussion

No Comment Found