Getting JSON for Angular 2 from HTTP remote server fails, but succeeds localy

人走茶凉 提交于 2019-11-29 16:40:49

Not found collection error suggest that you have used angular-in-memory-web-api before. You need to remove everything related to that from your project, that would equal removing from imports in your NgModule the equal of the following:

InMemoryWebApiModule.forRoot(InMemoryDataService)

so that you are able to use external api and db.

Otherwise your code shouldn't change, but if you want, following this tutorial should help you.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!