source: trip-planner-front/src/app/_services/planner.service.ts@ eed0bf8

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: 460 bytes
RevLine 
[6a3a178]1import { HttpClient } from "@angular/common/http";
2import { Injectable } from "@angular/core";
3import { Observable } from "rxjs";
4import { Planner } from "../_models/planner";
5
6@Injectable({
7 providedIn: 'root'
8})
9export class PlannerService{
10 constructor(private httpClient: HttpClient){
11 }
12 getAllPlanners():Observable<Planner[]>{
13 let url = "http://localhost:8080/api/planners";
14 return this.httpClient.get<Planner[]>(url);
15 }
16}
Note: See TracBrowser for help on using the repository browser.