Revision 50432
Added by Myrto Koukouli about 6 years ago
metrics-instructions.component.ts | ||
---|---|---|
4 | 4 |
|
5 | 5 |
import {Component, OnInit} from '@angular/core'; |
6 | 6 |
import {PiwikInfo} from '../../domain/typeScriptClasses'; |
7 |
import {RepositoryService} from '../../services/repository.service'; |
|
8 | 7 |
import {ActivatedRoute} from '@angular/router'; |
8 |
import { PiwikService } from '../../services/piwik.service'; |
|
9 | 9 |
|
10 | 10 |
@Component ({ |
11 | 11 |
selector: 'app-metrics-instructions', |
... | ... | |
18 | 18 |
|
19 | 19 |
constructor( |
20 | 20 |
private route: ActivatedRoute, |
21 |
private repoService: RepositoryService
|
|
21 |
private piwikService: PiwikService
|
|
22 | 22 |
) {} |
23 | 23 |
|
24 | 24 |
ngOnInit() { |
... | ... | |
27 | 27 |
|
28 | 28 |
getPiwik(): void { |
29 | 29 |
let id = this.route.snapshot.paramMap.get('id'); |
30 |
this.repoService.getPiwikInfo(id).subscribe(
|
|
30 |
this.piwikService.getPiwikInfo(id).subscribe(
|
|
31 | 31 |
piwik => this.piwik = piwik, |
32 | 32 |
error => console.log(error) |
33 | 33 |
); |
Also available in: Unified diff
reorganized services