早上好, 我正在尝试将 ng 添加到我的角度 8/9 应用程序中用于 ngrx/data 编译时没有错误,但在运行时,我在控制台中收到 HttpClient 没有提供程序错误。 对于正在运行的效果、存储和实体包来说,没有这样的问题。
删除行时 EntityDataModule.forRoot(entityConfig( 从应用程序模块中没有错误,但没有 NGRX 数据。
谢谢
试试这个:
To resolve this problem HttpClient is Angular's mechanism for communicating with a remote server over HTTP.
To make HttpClient available everywhere in the app,
open the root AppModule,
import the HttpClientModule from @angular/common/http,
add it to the @NgModule.imports array.
Add the following to app.module.ts:
import { HttpClientModule } from '@angular/common/http';
After that add in the import section like imports:[HttpClientModule, ]