I am attempting to inject a controller into my app.run
function, but I keep encountering the following error:
Uncaught Error: [$injector:unpr] http://errors.angularjs.org/1.2.10/$injector/unpr?p0=AuthenticationControllerProvider%20%3C-%20AuthenticationController
This is what my app.js
looks like:
var app = angular.module('app', [
'AuthenticationModule'
]);
app.run(['$rootScope', 'AuthenticationService', 'AuthenticationController',
function($rootScope, AuthenticationService, AuthenticationController) {
console.log(AuthenticationController);
}
]);
The injection of AuthenticationService
is working correctly. Can anyone explain why AuthenticationController
is not being injected?