mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-18 07:23:03 +00:00
45621: finished filter facets for search sidebar
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Injectable, OnDestroy } from '@angular/core';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { ActivatedRoute, convertToParamMap, Params, } from '@angular/router';
|
||||
import { isNotEmpty } from './empty.util';
|
||||
@@ -9,6 +9,14 @@ export class RouteService {
|
||||
constructor(private route: ActivatedRoute) {
|
||||
}
|
||||
|
||||
getQueryParameterValues(paramName: string): Observable<string[]> {
|
||||
return this.route.queryParamMap.map((map) => map.getAll(paramName));
|
||||
}
|
||||
|
||||
getQueryParameterValue(paramName: string): Observable<string> {
|
||||
return this.route.queryParamMap.map((map) => map.get(paramName));
|
||||
}
|
||||
|
||||
hasQueryParam(paramName: string): Observable<boolean> {
|
||||
return this.route.queryParamMap.map((map) => {return map.has(paramName);});
|
||||
}
|
||||
|
Reference in New Issue
Block a user