Usually I have "MainCtrl" in the body tag and put global things in it.
<body ng-controller="MainCtrl"> ... </body> function MainCtrl($scope, authService) { $scope.isLoggedIn = function() { return authService.isLoggedIn(); } }
Then each other region inherits the isLoggedIn function.
You can also put isLoggedIn in $ rootScope, but I like it.
Andrew Joslin
source share