title: ngx-pagination - Reset pagination to first page
body: <p>I am using ngx-pagination with server side paging. So, user enters some search criteria and hits the search button. This results in a call to the server for the first page of the results. On the client side, I have this code to show the pagination controls</p>
  
  <pre><code>&lt;div class="col-sm-4"&gt;
    &lt;pagination-controls (pageChange)="getPage($event)" 
                         id="serverPaging"&gt;
    &lt;/pagination-controls&gt;
  &lt;/div&gt;
  
  &lt;div *ngFor="let result of results | paginate: { 
    id:'serverPaging', 
    itemsPerPage: 10, 
    currentPage: p, 
    totalItems: totalResultCount }"&gt;
    ...
  &lt;/div&gt;
  </code></pre>
  
  <p>This works as expected. The first page is shown and '1' in the pagination bar is highlighted.</p>
  
  <p>Lets say, user now clicks on last page. This would highlight the last page in the pagination bar. Everything works as expected so far.</p>
  
  <p>Now user re-executes the search by clicking on the 'Search' button again. This re-renders the search results. Since it's a fresh search, server returns the first page. However, pagination bar still has the last page highlighted.</p>
  
  <p>How can I reset the pagination bar to the first page on some action, like re-execution of search.</p>
  
  <p>Angular version: 4.2.4
  ngx-pagination version: 3.0.0</p>