In your FooterCtrl controller FooterCtrl watch for route changes.
Whenever a route changes, select whether the user is registered or not.
Thus, your code will look something like this: in your controller, enter the following code:
$scope.$on('$routeChangeStart', function (next, current) {
Thus, your area is now aware that the user is logged in or not each time the route changes, which I assume if your application is configured correctly, every time a different template is loaded into ng-view .
Now your presentation may be as simple as:
<div ng-view> </div> <div ng-controller="FooterCtrl"> <footer ng-show="userIsLoggedIn"> </footer> <footer ng-hide="userIsLoggedIn"> </footer> </div>
Thus, your footer displays data based on the user's login state. Each time the viewing template is changed, the controller will determine the login state and display the view accordingly.
source share