Last change
on this file since eed0bf8 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
479 bytes
|
Line | |
---|
1 | import { HttpClient } from "@angular/common/http";
|
---|
2 | import { Injectable } from "@angular/core";
|
---|
3 | import { Observable } from "rxjs";
|
---|
4 | import { Companion } from "../_models/companion";
|
---|
5 |
|
---|
6 |
|
---|
7 | @Injectable({
|
---|
8 | providedIn: 'root'
|
---|
9 | })
|
---|
10 |
|
---|
11 | export class CompanionService{
|
---|
12 | constructor(private httpClient : HttpClient){
|
---|
13 | }
|
---|
14 |
|
---|
15 | getAllCompanions():Observable<Companion[]>{
|
---|
16 | let url = "http://localhost:8080/api/companions";
|
---|
17 | return this.httpClient.get<Companion[]>(url);
|
---|
18 | }
|
---|
19 | } |
---|
Note:
See
TracBrowser
for help on using the repository browser.