title: Implement a dynamic sidebar, which refresh on particular actions
body: <p>I am trying to build a dynamic sidebar, which displays elements depending on the current user state. So only some elements should be displayed, if the user is logged in and some others, if the the user isn´t.</p>
  
  <p>The current state is saved in the userService. There also is a method, which return the current state:</p>
  
  <pre><code>angular.module('app').service('userService', ['$http', 'base64', function ($http, base64) {
  
  var user = {
      auth: "",
      ask: "",
      mandant: ""
  };
  
  ...
  this.isloggedIn = function(){
          if(user.auth != "" &amp;&amp; user.ask != "" &amp;&amp; user.mandant != "")
          {
              return true;
          }
          else
          {
              return false;
          }
  ...
  
  }]);
  </code></pre>
  
  <p>Now I created a small controller:</p>
  
  <pre><code>angular.module('app')
  .controller('sidebarController',['$scope', 'userService',  function($scope, userService) {
  
  $scope.loggedIn = userService.isloggedIn();
  
  }]);
  </code></pre>
  
  <p>My sidebar looks like this:</p>
  
  <pre><code>&lt;div class="scrollable" ng-controller="sidebarController"&gt;
    &lt;h1 class="scrollable-header app-name"&gt;Navigation&lt;/h1&gt;  
    &lt;div class="scrollable-content"&gt;
      &lt;div class="list-group" ui-turn-off='uiSidebarLeft'&gt;
  
  
        &lt;a class="list-group-item green" href="#/login" ng-hide="loggedIn"&gt;Login&lt;/a&gt;
        &lt;a class="list-group-item red" href="#/logout" ng-show="loggedIn"&gt;Logout&lt;/a&gt;
  
  
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>The Goal :</strong> The sidebar should only display the login element, if the user is logged out and only the logout element, if the user is logged in.</p>
  
  <p>After runing this, the sidebar only displays the login element, but after login the sidebar do not change. How can i force the sidebar to refresh?</p>