Last change
on this file since eed0bf8 was eed0bf8, checked in by Ema <ema_spirova@…>, 3 years ago |
editing location-form on frontend and backend
|
-
Property mode
set to
100644
|
File size:
454 bytes
|
Rev | Line | |
---|
[eed0bf8] | 1 | import { HttpClient } from "@angular/common/http";
|
---|
| 2 | import { Injectable } from "@angular/core";
|
---|
| 3 | import { Observable } from "rxjs";
|
---|
| 4 | import { Region } from "../_models/region";
|
---|
| 5 |
|
---|
| 6 | @Injectable({
|
---|
| 7 | providedIn: 'root'
|
---|
| 8 | })
|
---|
| 9 | export class RegionService{
|
---|
| 10 | constructor(private httpClient: HttpClient){
|
---|
| 11 | }
|
---|
| 12 |
|
---|
| 13 | getAllRegions():Observable<Region[]>{
|
---|
| 14 | let url = "http://localhost:8080/api/regions";
|
---|
| 15 | return this.httpClient.get<Region[]>(url);
|
---|
| 16 | }
|
---|
| 17 | } |
---|
Note:
See
TracBrowser
for help on using the repository browser.