我有一个组件和服务,我尝试在组件中注入服务(ListUserService)。我导入服务,请求它,得到一个错误,当我删除该服务时,它运行良好,错误是什么?import { Component, OnInit } from '@angular/core';import {HttpClient} from '@angular/common/http'
下面是我的组件和服务文件中的一些代码。我抛出的错误在带有getCars()函数的组件文件中。我调用的API托管在Heroku上。组件import { CarsService, Car } from '..alert("Could not retrieve a list of cars"); )服务
import { Injectable } from '