I\'m new to angular and developing my first \'real\' application. I\'m trying to build a calendar/scheduling app ( source code can all be seen on github ) and I want to be a
You can have a global user
object inside the $rootScope
and have it injected in all your controllers by simply putting it into the arguments of the controller, just as you do with $scope
. Then you can implement functionalities in a simple check: if($rootScope.user)
. This allows you to model the user
object in any way you want and where you want, acting as a global variable, inside of Angular's domain and good practices with DI.