title: Check/ Uncheck All checkboxes - AngularJS ng-repeat
body: <p>I have a structure which looks like this: <a href="http://jsfiddle.net/deeptechtons/TKVH6/" rel="nofollow">http://jsfiddle.net/deeptechtons/TKVH6/</a></p>
  
  <pre><code>&lt;div&gt;
  &lt;ul ng-controller="checkboxController"&gt;
      &lt;li&gt;Check All
          &lt;input type="checkbox" ng-model="selectedAll" ng-click="checkAll()" /&gt;
      &lt;/li&gt;
      &lt;li ng-repeat="item in Items"&gt;
          &lt;label&gt;{{item.Name}}
              &lt;input type="checkbox" ng-model="item.Selected" /&gt;
          &lt;/label&gt;
      &lt;/li&gt;
  &lt;/ul&gt;
  &lt;/div&gt;
  
  angular.module("CheckAllModule", [])
  .controller("checkboxController", function checkboxController($scope) {
  
  
  $scope.Items = [{
      Name: "Item one"
  }, {
      Name: "Item two"
  }, {
      Name: "Item three"
  }];
  $scope.checkAll = function () {
      if ($scope.selectedAll) {
          $scope.selectedAll = true;
      } else {
          $scope.selectedAll = false;
      }
      angular.forEach($scope.Items, function (item) {
          item.Selected = $scope.selectedAll;
      });
  
  };
  
  
  });
  </code></pre>
  
  <p>When check all is selected or deselected, all other checkboxes are selected. But when "Check All" is selected, and I deselect one of the items, I want "Check All" to be deselected.</p>
  
  <p>Thanks in advance!</p>
  
  <p>(PS: Thanks to deeptechtons for the JSFiddle)</p>