首页 > 解决方案 > 在 IE9 中使用 angularjs 重定向页面时的问题

问题描述

我有以下脚本可以重定向到我想要的页面

    $location.$$urlUpdatedByLocation = true;
    $location.$$absUrl = location.origin+location.pathname+"busqTerceros.html"; 

在文件 busqTerceros.html 我有以下内容:

   <meta http-equiv="refresh" content="0; url=/cones/#!/search" />

这个搜索是从 AngularJS api 路由器完成的。从我在论坛上读到的内容,IE 在使用 #! 时会丢失路径。

有谁知道为什么 IE 会这样做?如何解决?

这适用于 Google chrome、Firefox,但不适用于 IE,屏幕上生成的错误如下: 错误

标签: javascriptangularjsinternet-explorer

解决方案


推荐阅读