Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在订阅中设置 mat-pagintor 时,我仍然不确定。我设置数据后设置它。
如果您有*ngIf(像我一样),请确保您<mat-paginator [pageSizeOptions]="[ 3, 5, 10, 20]" showFirstLastButtons></mat-paginator>在*ngIf. 一旦你把它放在外面并在订阅中设置分页/排序,你应该会很好。
*ngIf
<mat-paginator [pageSizeOptions]="[ 3, 5, 10, 20]" showFirstLastButtons></mat-paginator>