AngularJS Tutorial - Disable select by checkbox








The following code shows how to Disable select by checkbox.

Example


<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.13/angular.js"></script>
</head><!--   ww  w. ja  va2 s.c  om-->
<body>
  <div ng-app="">
  Send to Office: <input type="checkbox" ng-model="checked" ng-init="checked=true"><br/>
  <select id="transferTo" ng-disabled="checked">
    <option>Tech1</option>
    <option>Tech2</option>
  </select>
</div>
</body>
</html>

The code above is rendered as follows: