MCPcopy Create free account
hub / github.com/angular/components / getNumberOfPages

Method getNumberOfPages

src/material/paginator/paginator.ts:285–291  ·  view source on GitHub ↗

Calculate the number of pages

()

Source from the content-addressed store, hash-verified

283
284 /** Calculate the number of pages */
285 getNumberOfPages(): number {
286 if (!this.pageSize) {
287 return 0;
288 }
289
290 return Math.ceil(this.length / this.pageSize);
291 }
292
293 /**
294 * Changes the page size so that the first item displayed on the page will still be

Callers 3

lastPageMethod · 0.95
hasNextPageMethod · 0.95
paginator.spec.tsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected