<!--The ng-disabled directive binds AngularJS application data to the disabled attribute of HTML elements.--> <!-- ng-disabled --> <!doctype html> <html ng-app> <head> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.3/angular.min.js"></script> </head> <body> <!--<div ng-app="myApp" ng-init="mySwitch=true">--> <!-- <button ng-disabled="mySwitch">Click Me</button>--> <!-- <input type="checkbox" ng-model="mySwitch"/>Button</div>--> <!-- <p>{{ mySwitch }}</p>--> <!-- ng-show-> The ng-show directive shows or hides an HTML element --> <div ng-app="" ng-init="switch=true"> <p ng-show="switch">i am visible</p> <!--<p ng-show="switch:false">i am invisible</p>--> <p ng-hide="true">i am invisible</p> <input type="checkbox" ng-model="switch">Check1 </div> <!-- ng-hide directive->The ng-hide directive hides or shows an HTML element. --> </body> </html>
We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy. Accept Learn more