In a Windows Phone 7.1 emulator with PhoneGap 3.0 and AngularJS 1.2, why does this not work:
angulargap.controller('HomeController', ['$scope', '$routeParams', '$location',
function ($scope, $routeParams, $location) {
$scope.$routeParams = $routeParams;
$scope.$location = $location;
$scope.message = "AngularJS!";
}]);
Error message:
ERROR:Error: [$injector:cdep] Circular dependency found:
http://errors.angularjs.org/1.2.0-rc.2/$injector/cdep?p0=
While this works:
angulargap.controller('HomeController', ['$scope', '$routeParams',
function ($scope, $routeParams) {
$scope.$routeParams = $routeParams;
$scope.message = "AngularJS!";
}]);
What is going wrong with injecting the $location service in this specific scenario? All works great in Chrome and Internet Explorer in a desktop browser. But it does not work in the Windows Phone 7 device emulator, nor on the physical device itself.