Project

General

Profile

1 50428 argiro.kok
import {Component, Input, ViewChild} from '@angular/core';
2 50681 argiro.kok
import {ActivatedRoute} from '@angular/router';
3
4 50428 argiro.kok
@Component({
5
    selector: 'openaire-search-datasets',
6
    template: `
7
8 50681 argiro.kok
    <search-datasets
9
    openaireLink="https://beta.explore.openaire.eu/search/find/datasets"
10
                [(advancedSearchParameters)]=advancedSearchParameters
11
                [(connectCommunityId)]=connectCommunityId>
12 50428 argiro.kok
    </search-datasets>
13
    `
14
})
15
16
export class OpenaireSearchDatasetsComponent {
17 50681 argiro.kok
  advancedSearchParameters:any={community: "%22egi%7C%7CEGI%20Federation%22", co: "and"};
18
  connectCommunityId:string;
19
  constructor(  private  route: ActivatedRoute) {
20
  }
21
  ngOnInit() {
22
    this.route.queryParams.subscribe(data => {
23 50428 argiro.kok
24 50681 argiro.kok
      if(data['community'] && data['community']!=""){
25
        var id= decodeURIComponent(data['community']);
26
        this.connectCommunityId = id.slice(1,id.length - 1);
27
        console.log("HEREEEE"+this.connectCommunityId);
28
      }
29
    });
30
  }
31 50428 argiro.kok
}