From 55c34533966c354ba6a79fe62f4c9df27ca7e8ac Mon Sep 17 00:00:00 2001 From: Jeremy Elbourn Date: Fri, 30 Jun 2017 11:21:37 -0700 Subject: [PATCH] docs(paginator): clean up language on API docs (#5443) --- src/lib/paginator/paginator.ts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/lib/paginator/paginator.ts b/src/lib/paginator/paginator.ts index 47a7158b478..debba318539 100644 --- a/src/lib/paginator/paginator.ts +++ b/src/lib/paginator/paginator.ts @@ -23,8 +23,13 @@ import {MATERIAL_COMPATIBILITY_MODE} from '../core'; * different page size or navigates to another page. */ export class PageEvent { + /** The current page index. */ pageIndex: number; + + /** The current page size */ pageSize: number; + + /** The current total number of items being paged */ length: number; } @@ -87,26 +92,26 @@ export class MdPaginator implements OnInit { this._updateDisplayedPageSizeOptions(); } - /** Increments the page index to the next page index if a next page exists. */ + /** Advances to the next page if it exists. */ nextPage() { if (!this.hasNextPage()) { return; } this.pageIndex++; this._emitPageEvent(); } - /** Decrements the page index to the previous page index if a next page exists. */ + /** Move back to the previous page if it exists. */ previousPage() { if (!this.hasPreviousPage()) { return; } this.pageIndex--; this._emitPageEvent(); } - /** Returns true if the user can go to the next page. */ + /** Whether there is a previous page. */ hasPreviousPage() { return this.pageIndex >= 1 && this.pageSize != 0; } - /** Returns true if the user can go to the next page. */ + /** Whether there is a next page. */ hasNextPage() { const numberOfPages = Math.ceil(this.length / this.pageSize) - 1; return this.pageIndex < numberOfPages && this.pageSize != 0;