title: select all checkboxes in angularJS
body: <p>I am new AngularJS. I am trying select all checkboxes with single checkbox and also execute  <code>checkboxClick</code> method. because we setting values to scope. How to do that?</p>
  
  <pre><code>&lt;input class="check-box" data-val="true" type="checkbox"&gt;Select All &lt;/input&gt;
            &lt;table class="table table-bordered"&gt;
                     &lt;tr&gt;
                         &lt;th&gt;&lt;/th&gt;
                         &lt;th&gt;Printed&lt;/th&gt;
                         &lt;th&gt;First Name&lt;/th&gt;
                         &lt;th&gt;Last Name&lt;/th&gt;
                         &lt;th&gt;Company&lt;/th&gt;
                         &lt;th&gt;City&lt;/th&gt;
                         &lt;th&gt;Country&lt;/th&gt;
                       &lt;/tr&gt;
                       &lt;tr ng-repeat="item in items"&gt;
                          &lt;td&gt;
                             &lt;input class="check-box" data-val="true" type="checkbox" ng-model="item.selected" ng-click="checkboxClick($event, item)"&gt;
                            &lt;/td&gt;
                            &lt;td&gt;
                            {{item.printed}}
                            &lt;/td&gt;
                            ....
                            ....
                        &lt;/tr&gt;
                     &lt;/table&gt;
  </code></pre>
  
  <p>JS</p>
  
  <pre><code> $scope.checkboxClick = function (eventobj, item) {
          if (eventobj.target.checked) {
              $scope.selectedItems.push(item);
              $scope.getLabel(item.id);
              $scope.getOrderItems(item.id);
              $scope.getPaymentItems(item.id);
          } else {
              $scope.removeItemFromSelection(item);
          };
      };
  </code></pre>