Last change
on this file since 7d80751 was ad60966, checked in by Mile Jankuloski <mile.jankuloski@…>, 4 years ago |
Auth fixes, bug fixes etc.
|
-
Property mode
set to
100644
|
File size:
689 bytes
|
Line | |
---|
1 | import { Component, OnInit } from '@angular/core';
|
---|
2 | import { DataService } from '../shared/data.service';
|
---|
3 | import { IPandemic } from '../shared/interfaces';
|
---|
4 |
|
---|
5 | @Component({
|
---|
6 | selector: 'app-korona',
|
---|
7 | templateUrl: './korona.component.html',
|
---|
8 | styleUrls: ['./korona.component.css']
|
---|
9 | })
|
---|
10 | export class KoronaComponent implements OnInit {
|
---|
11 | public korona: IPandemic;
|
---|
12 |
|
---|
13 | constructor(private dataService: DataService) {
|
---|
14 |
|
---|
15 | }
|
---|
16 |
|
---|
17 | ngOnInit(): void {
|
---|
18 | this.dataService.getPandemic()
|
---|
19 | .subscribe((res: IPandemic) => {
|
---|
20 | this.korona = res;
|
---|
21 | console.log(this.korona);
|
---|
22 | },
|
---|
23 | (err: any) => console.log(err),
|
---|
24 | () => console.log('Pandemic data retrieved'));
|
---|
25 | }
|
---|
26 |
|
---|
27 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.