Revision 56072
Added by Argiro Kokogiannaki almost 5 years ago
advancedSearchSoftware.component.ts | ||
---|---|---|
1 | 1 |
import {Component} from '@angular/core'; |
2 | 2 |
import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class"; |
3 |
import {ActivatedRoute} from "@angular/router"; |
|
4 |
import {FilterInfo, PortalAggregators} from "../../utils/aggregators"; |
|
3 | 5 |
|
4 | 6 |
@Component({ |
5 | 7 |
selector: 'openaire-advanced-search-software', |
... | ... | |
12 | 14 |
|
13 | 15 |
export class OpenaireAdvancedSearchSoftwareComponent { |
14 | 16 |
|
15 |
customFilter:SearchCustomFilter= new SearchCustomFilter();
|
|
16 |
constructor () {
|
|
17 |
this.customFilter.set("Country", "country", "CA" , "Canada"); |
|
17 |
customFilter:SearchCustomFilter= null;
|
|
18 |
constructor(private route: ActivatedRoute) {
|
|
19 |
|
|
18 | 20 |
} |
21 |
|
|
19 | 22 |
ngOnInit() { |
20 |
|
|
23 |
let id = this.route.snapshot.paramMap.get('id'); |
|
24 |
let agg: FilterInfo = PortalAggregators.getFilterInfoByMenuId(id); |
|
25 |
this.customFilter = PortalAggregators.getSearchCustomFilterByAggregator(agg); |
|
21 | 26 |
} |
22 | 27 |
} |
Also available in: Unified diff
[Aggregator|Trunk]