mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-16 22:43:03 +00:00
parse page info from rest api and add it to remotedata objects
This commit is contained in:
30
src/app/core/shared/page-info.model.ts
Normal file
30
src/app/core/shared/page-info.model.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
import { autoserialize, autoserializeAs } from "cerialize";
|
||||
|
||||
/**
|
||||
* Represents the state of a paginated response
|
||||
*/
|
||||
export class PageInfo {
|
||||
/**
|
||||
* The number of elements on a page
|
||||
*/
|
||||
@autoserializeAs(Number, 'size')
|
||||
elementsPerPage: number;
|
||||
|
||||
/**
|
||||
* The total number of elements in the entire set
|
||||
*/
|
||||
@autoserialize
|
||||
totalElements: number;
|
||||
|
||||
/**
|
||||
* The total number of pages
|
||||
*/
|
||||
@autoserialize
|
||||
totalPages: number;
|
||||
|
||||
/**
|
||||
* The number of the current page, zero-based
|
||||
*/
|
||||
@autoserializeAs(Number, 'number')
|
||||
currentPage: number;
|
||||
}
|
Reference in New Issue
Block a user