title: In table, get selected row id in array
body: <p>In table every row assosiated with checkbox and have option to check all row.
  I want to get selected rows id of table in array.</p>
  
  <p>Here is <a href="https://plnkr.co/edit/ssmjCnosuzbH1SlpVvcH?p=preview" rel="nofollow">plunker code</a>.</p>
  
  <p>HTML:</p>
  
  <pre><code> &lt;table id="datatable-buttons" class="table table-striped table-bordered"&gt;
                                      &lt;thead&gt;
                                          &lt;th&gt;
                                                &lt;input type="checkbox" ng-model="selectRowId" ng-click="selectedAll()"&gt;
                                          &lt;/th&gt;
                                      &lt;/thead&gt;
                                      &lt;tbody ng-init="get_product()"&gt;
                                          &lt;!--step 6--&gt;
                                          &lt;tr ng-repeat="product in filtered = (pagedItems| filter:search | orderBy : predicate :reverse) | startFrom:currentPage * entryLimit | limitTo:entryLimit | findobj:multipleVlaue | searchFor:searchString"&gt; &lt;!-- searchFor:searchString --&gt; 
                                              &lt;td&gt; 
                                                  &lt;input type="checkbox" ng-model="selctedIds[product.id]" ng-checked="product.deleted"&gt;
                                              &lt;/td&gt;
                                          &lt;/tr&gt;
                                      &lt;/tbody&gt;
                                  &lt;/table&gt;
  </code></pre>
  
  <p>Controller: </p>
  
  <pre><code>    $scope.selectedAll = function () {
      $scope.pagedItems.forEach(function (product) {
          if ($scope.selectRowId) {
              product.deleted = true;
          } else {
              product.deleted = false;
          }
      });
  }
  </code></pre>