0
在IE9中,我的角度路由不起作用,它會將我重定向到「#」#標籤之前的任何內容。角度路由ie9錯誤
mysite.com/#/info - > mysite.com
即使我手動刪除從URL中/#,然後再試一次,我仍然得到重定向。
它將'#'附加到我的URL,因爲html5模式在瀏覽器支持時使用History API,並且在不支持(如IE9)時回退到'hashbang'(#)。
$locationProvider.html5Mode(true);
$urlRouterProvider.otherwise("/");
$stateProvider
.state('statistics', {
url: "/path/:myId",
templateUrl: '../some/path/site.html',
controller: 'Ctrl'
}
);
一直在尋找不同的解決方案,如:
,但他們都不是爲我工作。
我正在尋找一種解決方案,而不必停用html5mode。任何人遇到類似的問題,並設法修復?
請參閱此解決方案: http://stackoverflow.com/questions/26140575/angularjs-ng-route-not-working-on-ie9-the-views-are-not-displayed –
@TekriwalD已經添加元標記,體內ng-app,沒有控制檯日誌:/它也不是真正的同樣的問題。 –