Table example.component.html

Only Added Content
<!-- Adding mat-paginator under table -->
<mat-paginator
  *ngIf="showPaginator"
  [length]="resultsLength"
  [pageSize]="pageSize"
  [pageSizeOptions]="pageSizeOptions"
  [pageIndex]="pageIndex"
  showFirstLastButtons="true"
  aria-label="Select page"
  (page)="handlePageEvent($event)">
</mat-paginator>