title: How to use paginator from material angular?
body: <p>I'm new to angular and trying to implement pagination in my app. I am trying to use <a href="https://material.angular.io/components/paginator/overview" rel="noreferrer">this material component.</a></p>
  
  <p>With the code below, I can get <code>length</code>, <code>pagesize</code>, and <code>pageSizeOptions</code> in my <code>.ts</code> file</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;md-paginator [length]="length"
                [pageSize]="pageSize"
                [pageSizeOptions]="pageSizeOptions"
  &lt;/md-paginator&gt;
  </code></pre>
  
  <pre class="lang-js prettyprint-override"><code>export class PaginatorConfigurableExample {
  
    length = 100;
    pageSize = 10;
    pageSizeOptions = [5, 10, 25, 100];
  
    }
  }
  </code></pre>
  
  <p>but I can't seem to trigger a function to change the data on the table above when the page is changed. Also, how do I use the <code>nextPage</code>, <code>previousPage</code>, <code>hasNextPage</code>, and <code>hasPreviousPage</code> methods?</p>