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

Last change on this file was 59329aa, checked in by Ema <ema_spirova@…>, 3 years ago

adding photos

  • Property mode set to 100644
File size: 511 bytes
Line 
1import { HttpClient } from "@angular/common/http";
2import { Injectable } from "@angular/core";
3import { Observable } from "rxjs";
4import { Images } from "../_models/images";
5
6@Injectable({
7 providedIn:'root'
8})
9export class ImagesService{
10 constructor(private httpClient: HttpClient){
11 }
12
13 getAllImagesForLocation(locationId : number):Observable<Images[]>{
14 let url = "http://localhost:8080/api/images";
15 return this.httpClient.get<Images[]>(url + "?locationId=" + locationId);
16 }
17}
Note: See TracBrowser for help on using the repository browser.