title: angular2 datatable - override Default Sorter and pagination?
body: <p>I am using <a href="https://www.npmjs.com/package/angular2-datatable" rel="nofollow noreferrer">angular2-datatable</a> in my projects to show some tables of data.</p>
  
  <p>For now, I load 100 items and the sorting &amp; pagination are done on the loaded items.</p>
  
  <p>In my case, my users have around 3K objects each, so I don't want to load them all into my table.</p>
  
  <p>However I want to be able to do some pagination and some sorting myself, using my API.</p>
  
  <p>-> But for that, I need to be able to override the <code>mfDefaultSorter</code></p>
  
  <p>I have this  :</p>
  
  <pre><code>&lt;table class="table  table-hover table-outline mb-0 " [mfData]="items" #mf="mfDataTable" [mfRowsOnPage]="RowsOnPage" &gt;
    &lt;thead class="thead-default"&gt;
       &lt;tr&gt;
  
         &lt;th&gt;
           &lt;mfDefaultSorter by="type"&gt;Type&lt;/mfDefaultSorter&gt;
         &lt;/th&gt;
  
      &lt;/tr&gt;
   .....
  </code></pre>
  
  <p>so here, the <code>mfDefaultSorter</code> will sort the items by my field 'type'.
  But now I want it to go in a method of my <code>component.component.ts</code> so I can do the sorting with my API</p>
  
  <p>and with the same ideas, the pagination is done on the loaded items,
  But I want to be able to do it from my API.</p>
  
  <p><strong>Any ideas ?</strong></p>
  
  <p>if the package is not able to do that, do you have another package in mind ?</p>
  
  <p>Thanks !</p>