在IE上运行角度时网络错误0x7b

时间:2018-04-27 06:54:08

标签: angular internet-explorer xmlhttprequest

我正在使用IE11。 我的角度应用程序适用于Chrome和Firefox。

当我在我的应用上触发Http请求时,我收到此错误

SCRIPT7002: XMLHttpRequest: Network Error 0x7b, The filename, directory name, or volume label syntax is incorrect.
file : search

http://localhost:4200/search是实际路径。

当我点击 file : search我在调试器中收到此消息Error when open http://localhost:4200/search (this message appear when I trigger the HTTP service)

我在index.html上添加了一些meta但没有结果

<!DOCTYPE  html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=Edge">
...

1 个答案:

答案 0 :(得分:2)

我找到了解决方案

在我的代码中,我以这种方式调用服务器ip http:///IP.com(3斜杠)

将其更改为http://IP.com解决了错误。

相关问题