我有一个 AngularJS 应用程序,其中包含所有常见的 IE 解决方法:
<html id="ng-app" class="ng-app:clientsite" ng-app="clientsite" xmlns:ng="http://angularjs.org">
<head>
<!--[if lt IE 9]>
<script src="js/html5.js"></script>
<![endif]-->
<!--[if lte IE 8]>
<script>
document.createElement('ng-include');
document.createElement('ng-pluralize');
document.createElement('ng-view');
document.createElement('ng:include');
document.createElement('ng:pluralize');
document.createElement('ng:view');
</script>
<![endif]-->
<!--[if lt IE 8]>
<script src="js/json2.js"></script>
<![endif]-->
该站点有效,我可以到达任何路线,除了 IE7 没有选择空路线“/”:
$routeProvider
.when("/",
{
templateUrl: "/htm/home.htm"
})
它正在路由到我的其他路线:
.otherwise(
{
templateUrl: "/htm/notfound.htm"
});
如果我在路线末尾添加 /#/,它会起作用,但我们的客户不会接受(人们需要能够直接访问 www.theirsite.com,我们不能要求 www.theirsite .com/#/)。
在幕后,我有一个 ASP.Net MVC 服务器,它只是将所有内容路由回我的索引文件(它可以全面工作,除了 IE7 中的这条路由)。
如何让空路由在 IE7 中正常工作?