<mat-paginator
#paginator ---> this to combine with @ViewChild
[hidePageSize]="true" ---> this to hide page size
[pageSizeOptions]="[20]" ---> this to set how many items could be displayed on one sigle page, is an Array
showFirstLastButtons> --->
</mat-paginator>
paginator
this to combine with @ViewChild
hidePageSize
this to hide page size when it is true
[hidePageSize = false ] or just without this attribute
[hidePageSize = true ]
pageSizeOptions
this to set how many items could be displayed on one sigle page, is an Array
.module.ts
Notice here, after
Angular 8
should import from '@angular/material/paginator'.component.ts
.component.html
paginator
this to combine with @ViewChild
hidePageSize
this to hide page size when it is true
[hidePageSize = false ] or just without this attribute
[hidePageSize = true ]
pageSizeOptions
this to set how many items could be displayed on one sigle page, is an Array
[pageSizeOptions]="[5,10,15]"
showFirstLastButtons
with showFirstLastButtons
without showFirstLastButtons