Last change
on this file since 4b342bb was 4b342bb, checked in by Mile Jankuloski <mile.jankuloski@…>, 3 years ago |
Connecting front to back
|
-
Property mode
set to
100644
|
File size:
609 bytes
|
Line | |
---|
1 | import { Component, Inject } from '@angular/core';
|
---|
2 | import { HttpClient } from '@angular/common/http';
|
---|
3 | import { HealthFacilities } from '../models/HealthFacilities';
|
---|
4 | @Component({
|
---|
5 | selector: 'app-counter-component',
|
---|
6 | templateUrl: './counter.component.html',
|
---|
7 | styleUrls: ['./counter.component.css']
|
---|
8 | })
|
---|
9 | export class CounterComponent {
|
---|
10 | public facilities: HealthFacilities[];
|
---|
11 |
|
---|
12 | constructor(http: HttpClient, @Inject('BASE_URL') baseUrl: string) {
|
---|
13 | http.get<HealthFacilities[]>(baseUrl + 'HealthFacilities').subscribe(result => {
|
---|
14 | this.facilities = result;
|
---|
15 | }, error => console.error(error));
|
---|
16 | }
|
---|
17 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.