Reputation: 112
I am trying to add google-maps to my module, but I am getting this issue - Error: [$injector:unpr] and something like this at the end -
angular.module("app", ["google-maps"])
angular.module("app.controllers", ["ngCookies"]).controller("AppCtrl", ["$scope", "$location", "$cookies",
function($scope, $location, $cookies) {
return $scope.isSpecificPage = function() {
}, $scope.main = {
}
}
}]).controller("DashboardCtrl", ["$scope", "$cookies", "$location", "google-maps",
function($scope, $cookies, $location) {
return $scope.map = {
center: {
latitude: 45,
longitude: -73
},
zoom: 8
};
}])
I followed this like placing the files in the same order- https://angular-ui.github.io/angular-google-maps/#!/use but I am facing issues. Could someone please respond to this.
Upvotes: 0
Views: 94
Reputation: 8346
Looks like google-maps
dependancy is not included properly in controller DashboardCtrl
controller("DashboardCtrl", ["$scope", "$cookies", "$location", "google-maps",
function($scope, $cookies, $location) {
Can you please remove the dependancy
controller("DashboardCtrl", ["$scope", "$cookies", "$location",
function($scope, $cookies, $location) {
Upvotes: 1