62063: Configurable Browse-By menus

This commit is contained in:
Kristof De Langhe
2019-04-30 16:54:50 +02:00
parent 67e5578bba
commit 41e55d8d44
4 changed files with 37 additions and 54 deletions

View File

@@ -1,4 +1,6 @@
import { Component, Input } from '@angular/core';
import { Component, Inject, Input, OnInit } from '@angular/core';
import { GLOBAL_CONFIG, GlobalConfig } from '../../../config';
import { BrowseByTypeConfig } from '../../../config/browse-by-type-config.interface';
/**
* A component to display the "Browse By" section of a Community or Collection page
@@ -8,9 +10,19 @@ import { Component, Input } from '@angular/core';
selector: 'ds-comcol-page-browse-by',
templateUrl: './comcol-page-browse-by.component.html',
})
export class ComcolPageBrowseByComponent {
export class ComcolPageBrowseByComponent implements OnInit {
/**
* The ID of the Community or Collection
*/
@Input() id: string;
types: BrowseByTypeConfig[];
constructor(@Inject(GLOBAL_CONFIG) public config: GlobalConfig) {
}
ngOnInit(): void {
this.types = this.config.browseBy.types;
}
}