我正在尝试扩展一项服务,并且已经通过以下方式进行了扩展:
@Injectable({
providedIn: 'root'
})
export class CatService extends productservice
{
static ngInjectableDef = undefined;
constructor(cacheservice : CacheService , a: ForceService, b: AicService, c: MetadataService, d: Configuration, e: AParser, f: Injector){
super(cacheservice,a,b,c,d,e,f);
}
public globalFilter() : Observable<AFilter[]>
{
return Observable.of([new AFilter(this.type, [new ACondition(this.type, "IsHidden", "Equal", !1)], [new AFilter(this.type, [new ACondition(this.type, "AncestorId", "NotNull", null), new ACondition(this.type, "PrimordialId", "NotEqual", null)], null, "AND")])]);
}
}
在我的app.module.ts中
providers:[CategoryService,CatService]
现在,当我运行应用程序时,出现以下错误:
未捕获(承诺):错误:
的提供者
StaticInjectorError(AppModule)[CatService-> function(){
]:
StaticInjectorError(平台:核心)[CatService-> function(){
]:
NullInjectorError:没有提供function(){