PhoneGap 3.0 および AngularJS 1.2 を使用する Windows Phone 7.1 エミュレーターで、これが機能しないのはなぜですか。
angulargap.controller('HomeController', ['$scope', '$routeParams', '$location',
function ($scope, $routeParams, $location) {
$scope.$routeParams = $routeParams;
$scope.$location = $location;
$scope.message = "AngularJS!";
}]);
エラーメッセージ:
ERROR:Error: [$injector:cdep] Circular dependency found:
http://errors.angularjs.org/1.2.0-rc.2/$injector/cdep?p0=
これが機能している間:
angulargap.controller('HomeController', ['$scope', '$routeParams',
function ($scope, $routeParams) {
$scope.$routeParams = $routeParams;
$scope.message = "AngularJS!";
}]);
この特定のシナリオで $location サービスを挿入すると何が問題になるのでしょうか? デスクトップ ブラウザの Chrome と Internet Explorer では、すべてうまく機能します。ただし、Windows Phone 7 デバイス エミュレーターや物理デバイス自体では機能しません。