import { HttpClient } from '@angular/common/http' ; import { Injectable } from '@angular/core' ; import { Observable } from 'rxjs' ; import { CarImage } from '../models/carImage' ; import { Customer } from '../models/customer' ; import { ListResponseModel } from '../models/listResponseModel' ; @ Injectable ( { providedIn : 'root' } ) export class CarImageService { apiUrl = 'https://localhost:5001/api/' ; constructor ( private httpClient ) { } getCarImages ( ) { return this . httpClient . get < ListResponseModel < CarImage > > ( this . apiUrl + 'carimages/getall' ) ; } getCarImageByCarId ( carId ) { return this . httpClient . get < ListResponseModel < CarImage > > ( this . apiUrl + 'carimages/getallbycarid?carId=' + carId ) ; } }