我已将我的应用程序链接到 NodeJS 服务器,在获取请求成功后,我在应用程序上收到错误未捕获( promise 中):响应状态为:0,URL:null
。
这是应用程序的最新分支: https://github.com/eshk12/Parabi/tree/DB-LINKED
这是 NodeJS 服务器: https://github.com/eshk12/parabiNodeJS
我正在谈论 /Services/NetworkServices.ts
内的函数 CreateMedicine()
。
函数CreateMedicine()
使用其GET
参数转到http://localhost:3000/Medicines/add/
并将它们插入数据库。
但出现未知错误。
希望大家能帮我解决这个问题。
谢谢!
最佳答案
我相信当 OPTIONS 调用失败时会发生这种情况。很可能是由于该服务不可用。
OPTIONS http://localhost/api/login net::ERR_CONNECTION_REFUSED
关于node.js - 未捕获( promise ): Response with status: 0 in Angular2/Ionic2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41419454/