$location
をangular.js
に入力して、queryparams
を提供しようとしています。私のコードはFirefoxでは完全に動作しますが、Internet Explorer 11では動作しません。$location
コードを削除すると動作します。
app.config(['$locationProvider', function($locationProvider) {
$locationProvider.html5Mode(true);
}]);
app.controller('appName',
['$scope', '$location', '$http', function($scope, $location, $http) {
alert(JSON.stringify($location));
}]);
エラーが理解することは困難である:
Error: Invalid argument. at xa (https://ajax.googleapis.com/ajax/libs/angularjs/1.4.9 /angular.min.js:147:373) at hd (https://ajax.googleapis.com/ajax/libs/angularjs/1.4.9/angular.min.js:97:498) ...
は私が間違ってやっている何かがありますか? $location.search()
のほかにIE11からqueryparams
を抽出する別の方法はありますか?
ありがとうございます!
index.htmlにを追加してみてください – Chisko