angularjs location.search ie9 ie8

angularjs location.search ie9 ie8,angularjs,internet-explorer-8,internet-explorer-9,Angularjs,Internet Explorer 8,Internet Explorer 9,我是AngularJS的新手,我正在尝试使用$location.search读取查询字符串键值对。以下代码适用于Chrome、IE10和Firefox: var app = angular.module('myApp', []); app.config(function($locationProvider){ $locationProvider.html5Mode(true).hashPrefix('!'); }); app.controller('ParamController'

我是AngularJS的新手,我正在尝试使用$location.search读取查询字符串键值对。以下代码适用于Chrome、IE10和Firefox:

var app = angular.module('myApp', []);

app.config(function($locationProvider){
    $locationProvider.html5Mode(true).hashPrefix('!');
});

 app.controller('ParamController', function($scope, $location, $window) {
     console.log($location.search()['term']);
 });
在IE8/9上,页面立即重新显示为“#!”在url中,例如从/demo/angularJS/index.html到/#/demo/angularJS/index.html

AngularJS中有没有办法读取和解析IE8/9中的查询字符串参数