AngularJS The ng-disabled Directive




AngularJS The ng-disabled Directive

<!DOCTYPE html>
<html>
   <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js">
   </script>
   <body>
      <div ng-app="" ng-init="mySwitch=true">
         <p>
            <button ng-disabled="mySwitch">Click Me!</button>
         </p>
         <p>
            <input type="checkbox" ng-model="mySwitch"/>Button
         </p>
         <p>
            {{ mySwitch }}
         </p>
      </div> 
   </body>
</html>

Output