import { inject, Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { map, Observable } from 'rxjs'; import { Recipe, RecipeInfoViews } from './model/Recipe.model'; @Injectable({ providedIn: 'root', }) export class RecipeService { private readonly http = inject(HttpClient); public getRecipes(): Observable { return this.http .get('http://localhost:8080/recipes') .pipe(map((res) => res.content)); } }