I'm using the new Angular router for 1.4 and it throws me an error when doing a simple controller for a component:
angular.module('app.campaigns',['security', 'ngNewRouter'])
.controller('CampaignsController', ['authService', '$rootScope', CampaignsController]);
function CampaignsController (authService, $rootScope) {
console.log ('this is campaigns controller');
this.currentUser = $rootScope.authService.currentUser;
this.authService = $rootScope.authService;
this.logout = authService.logout;
}
I've tried without injecting $rootScope and is the same. What am I doing wrong? A very similar component works like charm, but this doesn't.