1
|
import {Component} from '@angular/core';
|
2
|
import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class";
|
3
|
import {ActivatedRoute} from "@angular/router";
|
4
|
import {FilterInfo, PortalAggregators} from "../../utils/aggregators";
|
5
|
|
6
|
@Component({
|
7
|
selector: 'openaire-search-datasets',
|
8
|
template: `
|
9
|
|
10
|
<search-datasets [customFilter]="customFilter">
|
11
|
</search-datasets>
|
12
|
`
|
13
|
})
|
14
|
|
15
|
export class OpenaireSearchDatasetsComponent {
|
16
|
customFilter: SearchCustomFilter = null;
|
17
|
|
18
|
constructor ( private route: ActivatedRoute ) {
|
19
|
|
20
|
}
|
21
|
ngOnInit() {
|
22
|
let id = this.route.snapshot.paramMap.get('id');
|
23
|
let agg:FilterInfo = PortalAggregators.getFilterInfoByMenuId(id);
|
24
|
this.customFilter = PortalAggregators.getSearchCustomFilterByAggregator(agg);
|
25
|
}
|
26
|
}
|