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

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

Prototype N1

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