Project

General

Profile

1
import { Component, DoCheck, OnInit, ViewEncapsulation } from '@angular/core';
2
import { DataService } from '../../services/data.service';
3
import { OverviewData } from '../../domain/overview-data';
4
import { ActivatedRoute } from '@angular/router';
5

    
6
@Component({
7
  selector: 'app-country-page',
8
  templateUrl: './country-page.component.html',
9
  // styleUrls: ['./top-menu.component.css'],
10
  encapsulation: ViewEncapsulation.None
11
})
12

    
13
export class CountryPageComponent implements OnInit {
14

    
15
  countryName: string;
16

    
17
  linkToCountryInOpenAIRE: string;
18

    
19
  // overviewData: OverviewData;
20

    
21
  // countrySelectedName: string = null;
22

    
23
  constructor(private dataService: DataService,
24
              private route: ActivatedRoute) { }
25

    
26
  ngOnInit(): void {
27

    
28
    window.scroll(0,0);
29

    
30
    this.countryName = this.route.snapshot.paramMap.get('countryName');
31
    this.linkToCountryInOpenAIRE = 'https://www.openaire.eu/item/' + this.countryName.replace(' ', '-');
32
    console.log('Country name: ', this.countryName);
33
    // this.dataService.getCountryData('').subscribe(
34
    //   overviewData => {
35
    //     this.overviewData = overviewData;
36
    //   },
37
    //   error => {
38
    //     console.log(error);
39
    //   }
40
    // );
41
  }
42
}
(4-4/4)