title: multiple ngx pagination error-angular 2
body: <p>I am using angular 2 for one of my projects and i am using ngx-pagination for paginating tables.The structure of my page is like this</p>
  
  <pre><code>parent-&gt;child1=table1
          child2-table-2
          child-table-3
          child4-table-4
  </code></pre>
  
  <p>each child calls its own rest request and fills the table.I have used child  components in parent as below</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="thirteen wide column" name="leave" id="leaveApproval"&gt;
      &lt;div class="ui extended segment"&gt;
          &lt;app-leave-approval&gt;&lt;/app-leave-approval&gt;
          &lt;div #leaveApproval&gt;&lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="thirteen wide right floated column" #timesheetApproval name="timesheet" id="timesheetApproval"&gt;
      &lt;div class="ui extended segment"&gt;
          &lt;app-timesheetapproval&gt;&lt;/app-timesheetapproval&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;div class="thirteen wide right floated column" #resourceApproval name="resource" id="resourceApproval"&gt;
      &lt;div class="ui extended segment"&gt;
          &lt;app-resource-approval&gt;&lt;/app-resource-approval&gt;
  
      &lt;/div&gt;
      &lt;div&gt;&lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>etc </p>
  
  <p>and in each child component i have used ngx-pagination as </p>
  
  <pre><code>&lt;tr *ngFor="let data of exitProcessPendingList | paginate: { itemsPerPage: 7, currentPage: pgNumber};let i=index"&gt;
  
  &lt;pagination-controls (pageChange)="pgNumber = $event"&gt;&lt;/pagination-controls&gt;
  </code></pre>
  
  <p>and each child has unique variable for pageNumber;</p>
  
  <p>Now the <strong>problem</strong> i am facing is,when i try to change the page number of one table,it effects other child tables as well.If i click on page-2 of first table,all other tables change their current page to page-2.What am i doing wrong ?Is there anything wrong in the way i am doing ?</p>