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

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: 626 bytes
Line 
1import { HttpClient } from "@angular/common/http";
2import { Injectable } from "@angular/core";
3import { Observable } from "rxjs";
4
5@Injectable({
6 providedIn: 'root'
7})
8export class LocationService{
9 constructor(private httpClient : HttpClient){}
10
11 getAllPlaces(locationId: number, companionId: number, lengthOfStay: number, categoryIds: string): Observable<Object[]>{
12 let url = "http://localhost:8080/api/trip/locations";
13 return this.httpClient.get<Location[]>(url + '?locationId=' + locationId + '&companionId=' + companionId + '&lengthOfStay=' + lengthOfStay + '&categoryIds='+ categoryIds);
14 }
15}
Note: See TracBrowser for help on using the repository browser.