AngularJS DOM

1. What is ng-disabled directive? 

The ng-disabled directive sets the disabled attribute on the element.

<!DOCTYPE  html>
<html>
<head>
<script src="http://ajax.googleapis.com/
ajax/libs/angularjs/1.4.5/angular.min.js"></script>
</head>
<body>
<div ng-app="" ng-init="click=true">
<p>
<button ng-disabled="click">button</button>
</p>
<p>
<input type="checkbox" ng-model="click"/>click on checkbox
</p>
<p>
{{ click }}
</p>
</div>
</body>
</html>

 

2.What is Hide directive?

<!DOCTYPE  html>
<html>
<head>
<script src="http://ajax.googleapis.com/
ajax/libs/angularjs/1.4.5/angular.min.js"></script>
</head>
<body>
<div ng-app="" >
<input type ="checkbox" ng-model = "hide">Hide Button
<button ng-hide = "hide">click me!</button> 
</div>	
</body>
</html>

 

3.What is show directive?

<!DOCTYPE  html>
<html>
<head>
<script src="http://ajax.googleapis.com/
ajax/libs/angularjs/1.4.5/angular.min.js"></script>
</head>
<body>
<div ng-app="" >
<input type ="checkbox" ng-model = "show">Show Button
<button ng-show = "show">click me!</button> 
</div>	
</body>
</html>