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

Last change on this file since d8fafb8 was d8fafb8, checked in by DimitarSlezenkovski <dslezenkovski@…>, 2 years ago

Prototype N1

  • Property mode set to 100644
File size: 700 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.