auth is undefined - ui-router & Auth0
问题 I'm using auth0 with ui-router. When the default route is loaded I can see the auth object is defined and contains methods. I get an undefined error when I try to access the value inside a controller. What's the best way of sharing this object with my controllers as as a reusable object? !-- controller module.controller('login', ['$scope', function($scope,auth) { !--- }).run(function($rootScope, auth, store, jwtHelper, $state, $stateParams) { $rootScope.$on('$locationChangeStart', function()