mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ACA-3520] - fixed providing by default of the service (#5813)
This commit is contained in:
@@ -15,10 +15,10 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, OnInit, Optional, OnDestroy, Inject } from '@angular/core';
|
import { Component, OnInit, Optional, OnDestroy } from '@angular/core';
|
||||||
import { Router, ActivatedRoute, Params } from '@angular/router';
|
import { Router, ActivatedRoute, Params } from '@angular/router';
|
||||||
import { Pagination, ResultSetPaging } from '@alfresco/js-api';
|
import { Pagination, ResultSetPaging } from '@alfresco/js-api';
|
||||||
import { SearchQueryBuilderService, SEARCH_QUERY_SERVICE_TOKEN } from '@alfresco/adf-content-services';
|
import { SearchQueryBuilderService } from '@alfresco/adf-content-services';
|
||||||
import { UserPreferencesService, SearchService, AppConfigService } from '@alfresco/adf-core';
|
import { UserPreferencesService, SearchService, AppConfigService } from '@alfresco/adf-core';
|
||||||
import { Subject } from 'rxjs';
|
import { Subject } from 'rxjs';
|
||||||
import { takeUntil } from 'rxjs/operators';
|
import { takeUntil } from 'rxjs/operators';
|
||||||
@@ -27,7 +27,7 @@ import { takeUntil } from 'rxjs/operators';
|
|||||||
selector: 'app-search-result-component',
|
selector: 'app-search-result-component',
|
||||||
templateUrl: './search-result.component.html',
|
templateUrl: './search-result.component.html',
|
||||||
styleUrls: ['./search-result.component.scss'],
|
styleUrls: ['./search-result.component.scss'],
|
||||||
providers: [SearchService, { provide: SEARCH_QUERY_SERVICE_TOKEN, useClass: SearchQueryBuilderService}]
|
providers: [SearchService]
|
||||||
})
|
})
|
||||||
export class SearchResultComponent implements OnInit, OnDestroy {
|
export class SearchResultComponent implements OnInit, OnDestroy {
|
||||||
|
|
||||||
@@ -44,7 +44,7 @@ export class SearchResultComponent implements OnInit, OnDestroy {
|
|||||||
constructor(public router: Router,
|
constructor(public router: Router,
|
||||||
private config: AppConfigService,
|
private config: AppConfigService,
|
||||||
private preferences: UserPreferencesService,
|
private preferences: UserPreferencesService,
|
||||||
@Inject(SEARCH_QUERY_SERVICE_TOKEN) private queryBuilder: SearchQueryBuilderService,
|
private queryBuilder: SearchQueryBuilderService,
|
||||||
@Optional() private route: ActivatedRoute) {
|
@Optional() private route: ActivatedRoute) {
|
||||||
queryBuilder.paging = {
|
queryBuilder.paging = {
|
||||||
maxItems: this.preferences.paginationSize,
|
maxItems: this.preferences.paginationSize,
|
||||||
|
@@ -89,7 +89,7 @@ import { SearchQueryBuilderService } from './search-query-builder.service';
|
|||||||
SearchDateRangeComponent
|
SearchDateRangeComponent
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: SEARCH_QUERY_SERVICE_TOKEN, useClass: SearchQueryBuilderService }
|
{ provide: SEARCH_QUERY_SERVICE_TOKEN, useExisting: SearchQueryBuilderService }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
export class SearchModule {}
|
export class SearchModule {}
|
||||||
|
Reference in New Issue
Block a user