title: How to delete multiple rows using checkbox in Angular 2?
body: <p><strong>We want to delete multiple rows using checkbox in Angular 2.How to pass multiple ids of checked rows to array of component..How to search the particular id is in this array...How to remove id of unchecked row.....HOw to implement these functions is an single function..Please Help me</strong></p>
  
  <pre><code>&lt;div class="card-content table-responsive" *ngIf="this.pagedItems!=null &amp;&amp; this.pagedItems.length &gt; 0"&gt;
  
  &lt;table class="table"&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th class="text-danger" style="font-weight: bold"&gt;Sl NO&lt;/th&gt;
            &lt;!--  &lt;th class="text-danger" style="font-weight: bold"&gt;Date&lt;/th&gt;--&gt;
              &lt;th class="text-danger" style="font-weight: bold"&gt;Income/Expense&lt;/th&gt;
              &lt;th class="text-danger" style="font-weight: bold"&gt;Payment Mode&lt;/th&gt;
              &lt;th class="text-danger" style="font-weight: bold"&gt;Debtor&lt;/th&gt;
              &lt;th class="text-danger" style="font-weight: bold"&gt;Remarks&lt;/th&gt;
              &lt;th class="text-danger" style="font-weight: bold"&gt;Amount&lt;/th&gt;
              &lt;th class="text-danger" style="font-weight: bold"&gt;&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr  *ngFor="let item of this.pagedItems | paginate: { itemsPerPage: 500, currentPage: p }; let i = index"  &gt;
                  &lt;td&gt;{{i+1}}&lt;/td&gt;
              &lt;!--    &lt;td&gt;{{item.date_of_entry}}&lt;/td&gt;--&gt;
  
                  &lt;td&gt;{{item.income_expense}}&lt;/td&gt;
                  &lt;td&gt;{{item.payment_mode}}&lt;/td&gt;
                  &lt;td&gt;{{item.creditor_fname}}&lt;/td&gt;
                  &lt;td&gt;{{item.remarks}}&lt;/td&gt;
                  &lt;td&gt;{{item.amount}}&lt;/td&gt;
                  &lt;td&gt;{{item.entry_id}}&lt;/td&gt;
                  &lt;td&gt;&lt;input type="checkbox" data-md-icheck  #checkdelet id="{{item.entry_id}}" name="deletecheck" value="{{item.entry_id}}" (click)="selectID(item.entry_id,$event)"&gt;&lt;/td&gt;
  
          &lt;/tr&gt;
  
      &lt;button (click)="deleteSelected()"&gt;Delete&lt;/button&gt;
      &lt;/tbody&gt;
  &lt;/table&gt;
  
  &lt;br&gt;
  &lt;pagination-controls (pageChange)="p = $event"&gt;&lt;/pagination-controls&gt;
  </code></pre>
  
  <p></p>