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