更新时间:2023-11-19 18:14:28
我能够在另一个堆栈溢出问题中找到一个工作修复:
I was able to find a working fix in another stack overflow question:
问题是使用InMemoryWebApiModule,解决方案是对我的app.module.ts文件进行以下配置修改:
The problem was with the InMemoryWebApiModule and the solution was to make the following config modification to my app.module.ts file:
- InMemoryWebApiModule.forRoot(InMemoryDataService),
+ InMemoryWebApiModule.forRoot(InMemoryDataService, {passThruUnknownUrl: true}),
使这个小的配置更改导致应用程序工作。
Making this small config change caused the application to work.