diff --git a/src/app/collection-page/collection-page.component.ts b/src/app/collection-page/collection-page.component.ts index f730f44658..ce3b4e19b0 100644 --- a/src/app/collection-page/collection-page.component.ts +++ b/src/app/collection-page/collection-page.component.ts @@ -1,4 +1,4 @@ -import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core'; +import { ChangeDetectionStrategy, Component, OnInit, Inject } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import { BehaviorSubject, combineLatest as observableCombineLatest, Observable, Subject } from 'rxjs'; import { filter, map, mergeMap, startWith, switchMap, take } from 'rxjs/operators'; @@ -29,6 +29,7 @@ import { FeatureID } from '../core/data/feature-authorization/feature-id'; import { getCollectionPageRoute } from './collection-page-routing-paths'; import { redirectOn4xx } from '../core/shared/authorized.operators'; import { BROWSE_LINKS_TO_FOLLOW } from '../core/browse/browse.service'; +import { APP_CONFIG, AppConfig } from '../../../src/config/app-config.interface'; @Component({ selector: 'ds-collection-page', @@ -69,12 +70,13 @@ export class CollectionPageComponent implements OnInit { private authService: AuthService, private paginationService: PaginationService, private authorizationDataService: AuthorizationDataService, + @Inject(APP_CONFIG) public appConfig: AppConfig, ) { - this.paginationConfig = new PaginationComponentOptions(); - this.paginationConfig.id = 'cp'; - this.paginationConfig.pageSize = 5; - this.paginationConfig.currentPage = 1; - this.sortConfig = new SortOptions('dc.date.accessioned', SortDirection.DESC); + this.paginationConfig = Object.assign(new PaginationComponentOptions(), { + id: 'cp', + currentPage: 1, + pageSize: this.appConfig.browseBy.pageSize, + }); }