1 |
50002
|
myrto.kouk
|
/**
|
2 |
|
|
* Created by myrto on 11/24/17.
|
3 |
|
|
*/
|
4 |
|
|
|
5 |
50216
|
myrto.kouk
|
import {Component, OnInit} from '@angular/core';
|
6 |
50170
|
myrto.kouk
|
import {PiwikInfo} from '../../domain/typeScriptClasses';
|
7 |
|
|
import {RepositoryService} from '../../services/repository.service';
|
8 |
|
|
import {ActivatedRoute} from '@angular/router';
|
9 |
49993
|
myrto.kouk
|
|
10 |
|
|
@Component ({
|
11 |
50002
|
myrto.kouk
|
selector: 'app-metrics-instructions',
|
12 |
|
|
templateUrl: 'metrics-instructions.component.html'
|
13 |
49993
|
myrto.kouk
|
})
|
14 |
|
|
|
15 |
50002
|
myrto.kouk
|
export class MetricsInstructionsComponent implements OnInit {
|
16 |
50216
|
myrto.kouk
|
piwik: PiwikInfo;
|
17 |
|
|
errorMessage: string;
|
18 |
49993
|
myrto.kouk
|
|
19 |
50170
|
myrto.kouk
|
constructor(
|
20 |
|
|
private route: ActivatedRoute,
|
21 |
|
|
private repoService: RepositoryService
|
22 |
|
|
) {}
|
23 |
49993
|
myrto.kouk
|
|
24 |
50170
|
myrto.kouk
|
ngOnInit() {
|
25 |
|
|
this.getPiwik();
|
26 |
|
|
}
|
27 |
|
|
|
28 |
|
|
getPiwik(): void {
|
29 |
|
|
let id = this.route.snapshot.paramMap.get('id');
|
30 |
|
|
this.repoService.getPiwikInfo(id).subscribe(
|
31 |
|
|
piwik => this.piwik = piwik,
|
32 |
50303
|
myrto.kouk
|
error => console.log(error)
|
33 |
50170
|
myrto.kouk
|
);
|
34 |
|
|
}
|
35 |
|
|
|
36 |
49993
|
myrto.kouk
|
}
|