AngularJS: how to refresh all visible controllers on page after state change? - Navigation after login
<p>I managed to get it working by using a directive <code>navbar</code> and including it in my index.html, but after login, when I make a state change, my navbar does not get updated. If I refresh the page manually, then it reflects the changes.</p>

<p>Is there a better way to do this? Thanks.</p>

<p><strong>index.html</strong></p>

<pre><code>&lt;navbar&gt;&lt;/navbar&gt;
&lt;div class="container"&gt;
  &lt;ui-view&gt;&lt;/ui-view&gt;
&lt;/div&gt;
</code></pre>

<p><br/>
<strong>navbar.html</strong></p>

<pre><code>    &lt;ul class="nav navbar-nav navbar-right"&gt;
      &lt;li&gt;&lt;a ui-sref="login" ng-hide="navbar.auth"&gt;Login&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="#" ng-click="navbar.Logout()" ng-show="navbar.auth"&gt;Logout&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
</code></pre>