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
|
// overviewData: OverviewData;
|
18
|
|
19
|
// countrySelectedName: string = null;
|
20
|
|
21
|
constructor(private dataService: DataService,
|
22
|
private route: ActivatedRoute) { }
|
23
|
|
24
|
ngOnInit(): void {
|
25
|
|
26
|
this.countryName = this.route.snapshot.paramMap.get('countryName');
|
27
|
console.log('Country name: ', this.countryName);
|
28
|
// this.dataService.getCountryData('').subscribe(
|
29
|
// overviewData => {
|
30
|
// this.overviewData = overviewData;
|
31
|
// },
|
32
|
// error => {
|
33
|
// console.log(error);
|
34
|
// }
|
35
|
// );
|
36
|
}
|
37
|
}
|