title: Angular to disable ng-repeat checkbox based on value
body: <p>I have a list of checkbox displayed using ng-repeat, now i need to disable some checkbox based on specific value checkbox is checked.</p>
  
  <pre><code>checkbox display code
  
  &lt;div class="checkbox"&gt;
       &lt;label ng-repeat="specific in specifications"&gt;
            &lt;input ng-click="onClick(specific, newObject[specific])" id="specifications_chk" value="{{specific}}" ng-model="newObject[specific]" type="checkbox"&gt;
            {{specific}}
       &lt;/label&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Here am using ng-click function to disable checkbox.</p>
  
  <pre><code>This is my controller code:
  
  $scope.onClick = function(sp, checked){
          if(sp == 'Sofa_Cleaning' &amp;&amp; checked === true){
              angular.element(document.getElementById('specifications_chk'))[0].disabled = true;
          }
  
          if(sp == 'Sofa_Cleaning' &amp;&amp; checked === false){
              angular.element(document.getElementById('specifications_chk'))[0].disabled = false;
          }
  
      };
  
  html view:
  </code></pre>
  
  <p>in controller code am able disable only first value <code>(IndepthHomeCleaning)</code>, so how can i disable <code>Room_Cleaning, Kitchen_Cleaning,</code> and <code>Carpet_cleaning</code> when <code>Sofa_Cleaning</code> is <code>checked</code>
  <a href="https://i.stack.imgur.com/hcmkN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hcmkN.png" alt="checkbox view"></a></p>
  
  <p>Am i stuck with this, Help will be really appreciated</p>