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.
- <!DOCTYPE html>
- <html ng-app>
-
- <head>
- <script src="http://code.angularjs.org/1.2.0/angular.min.js"></script>
- </head>
-
- <body> Check Me: <input type="checkbox" ng-model="checked"><br/> <button ng-model="button" ng-disabled="checked">Button</button> </body>
-
- </html>