source: trip-planner-front/src/app/_services/cateogry.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: 470 bytes
Line 
1import { HttpClient } from "@angular/common/http";
2import { Injectable } from "@angular/core";
3import { Observable } from "rxjs";
4import { Category } from "../_models/category";
5
6
7@Injectable({
8 providedIn: 'root'
9})
10export class CategoryService{
11 constructor(private httpClient: HttpClient){
12 }
13 getAllCategories():Observable<Category[]>{
14 let url = "http://localhost:8080/api/categories";
15 return this.httpClient.get<Category[]>(url);
16 }
17}
Note: See TracBrowser for help on using the repository browser.