Google News
logo
AngularJS - Interview Questions
How do you disable a button depending on a checkbox’s state ?
The developer can use the ng-disabled directive and bind its condition to the checkbox’s state.

<body ng-app>
  <label><input type="checkbox" ng-model="checked"/>Disable Button</label>
  <button ng-disabled="checked">Select Me</button>
</body>
Advertisement