title: Forcing re-evaluation of ng-if
body: <p>I have a header on my application that contains the 'Sign In'/'Create Account' option. When the user logs in I need the aforementioned to swap for the 'Sign Out' option. </p>
  
  <p>However when the user logs in the ui-view changes as expected but doesn't change the header, understandable because it isn't part of the ui-view. Here's my code so far:</p>
  
  <pre><code>&lt;ul id="nav-account"&gt;
      &lt;li&gt;{{mainCtrl.isAuthenticated ? 'Welcome ' + user.firstname + '!'&lt;/li&gt;
      &lt;li ng-if="!isAuthenticated"&gt;&lt;a ng-href="{{'HEADER_NAVTABS_SIGNIN'| externallinks}}"&gt;Sign In&lt;/a&gt; or &lt;a ng-href="{{'HEADER_NAVTABS_CREATE_ACCOUNT'| externallinks}}"&gt;Create Account&lt;/a&gt;&lt;/li&gt;
      &lt;li ng-if="isAuthenticated"&gt;&lt;a ui-sref="logout"&gt;Sign Out&lt;/a&gt;&lt;li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>In my controller I'm setting the value of <strong>isAuthenticated</strong> by calling a service:</p>
  
  <pre><code> $scope.isAuthenticated = memberService.isAuthenticated();
  </code></pre>
  
  <p>The only way that the header value will change is if I refresh the whole page - why is this? Shouldn't the ng-if re-evaluate the variable and update the view accordingly? </p>
  
  <p>Does this mean that ng-if is only bound one way? So what can I do to make this work?</p>
  
  <p>Thanks</p>
  
  <p>Andrew</p>