1
0

108588: Passed the scope to the browse sections

This commit is contained in:
Alexandre Vryghem
2023-12-13 01:19:46 +01:00
parent d9759d1136
commit d95f9d0140
10 changed files with 114 additions and 67 deletions

View File

@@ -1,7 +1,7 @@
import { Component, OnInit } from '@angular/core';
import { Observable } from 'rxjs';
import { BrowseByDataType } from '../../../../browse-by/browse-by-switcher/browse-by-data-type';
import { ActivatedRoute } from '@angular/router';
import { ActivatedRoute, Data } from '@angular/router';
import { map } from 'rxjs/operators';
import { BrowseDefinition } from '../../../../core/shared/browse-definition.model';
@@ -14,6 +14,8 @@ export class ComcolBrowseByComponent implements OnInit {
browseByType$: Observable<BrowseByDataType>;
scope$: Observable<string>;
constructor(
protected route: ActivatedRoute,
) {
@@ -26,6 +28,9 @@ export class ComcolBrowseByComponent implements OnInit {
this.browseByType$ = this.route.data.pipe(
map((data: { browseDefinition: BrowseDefinition }) => data.browseDefinition.getRenderType()),
);
this.scope$ = this.route.data.pipe(
map((data: Data) => data.scope),
);
}
}