pageNumber is click on the search query, with the new variable values.
import { MatPaginatorIntl } from '@angular/material'; const getRangeLabel = (page: number, pageSize: number, length: number) => { if (length === 0 || pageSize === 0) { return '无数据'; } length = Math.max(length, 0); const startIndex = page * pageSize; const endIndex = startIndex < length ? Math.min(startIndex + pageSize, length) : startIndex + pageSize; return '第' + (startIndex + 1) + ' - ' + endIndex + '条,共 ' + length + '条'; } export function myPaginator() { P const= New new MatPaginatorIntl (); p.itemsPerPageLabel = 'number of page' ; p.nextPageLabel = 'Next' ; p.previousPageLabel = 'Previous' ; p.firstPageLabel = 'first page' ; p.lastPageLabel = 'last page' ; p.getRangeLabel = getRangeLabel; return P; }