Enable Disable Button Based on Checkbox using AngularJS

To enable or disable button on checkbox selection we need to use ng-disabled property in AngularJS we need to write the code like as shown below.

  1. <!DOCTYPE html>  
  2. <html ng-app>  
  3.   
  4.     <head>  
  5.         <script src="http://code.angularjs.org/1.2.0/angular.min.js"></script>  
  6.     </head>  
  7.   
  8.     <body> Check Me: <input type="checkbox" ng-model="checked"><br/> <button ng-model="button" ng-disabled="checked">Button</button> </body>  
  9.   
  10. </html>