source: Farmatiko/ClientApp/src/app/korona/korona.component.ts@ de18858

Last change on this file since de18858 was de18858, checked in by Mile Jankuloski <mile.jankuloski@…>, 4 years ago

Prepared and improved components for data flows

  • Property mode set to 100644
File size: 697 bytes
Line 
1import { Component, OnInit, Inject } from '@angular/core';
2import { Pandemic } from '../models/Pandemic';
3import { MatTableDataSource } from '@angular/material/table';
4import { HttpClient } from '@angular/common/http';
5
6@Component({
7 selector: 'app-korona',
8 templateUrl: './korona.component.html',
9 styleUrls: ['./korona.component.css']
10})
11export class KoronaComponent implements OnInit {
12 public korona: Pandemic;
13
14 constructor(http: HttpClient, @Inject('BASE_URL') baseUrl: string) {
15 http.get<Pandemic>(baseUrl + 'Pandemic/Get?').subscribe(result => {
16 this.korona = result;
17 console.log(this.korona);
18 }, error => console.error(error));
19 }
20
21 ngOnInit(): void {
22 }
23
24}
Note: See TracBrowser for help on using the repository browser.