ng test错误:StaticInjectorError(DynamicTestModule)[EditCompanyDetailsModalComponent - > LocalStorageService]:

我也在提供程序中包含了LocalStorageService . 当我运行 ng test 时,它显示错误,说“错误:

StaticInjectorError(DynamicTestModule)[EditCompanyDetailsModalComponent - > LocalStorageService]:StaticInjectorError(Platform:core)[EditCompanyDetailsModalComponent - > LocalStorageService]:NullInjectorError:没有LocalStorageService的提供者!和TypeError:无法设置未定义的属性'validateForm'

回答(0)