title: AngularJS ng-show and ng-hide doesn't work
body: <p>having a problem with angularjs logic here</p>
  
  <p>I want to show the login link only when there is no user loggedin, and only show the logout link to logged in user, but it doesnt work properly</p>
  
  <p>my HTML</p>
  
  <pre><code> &lt;section ng-controller="a" ng-show="auth = false"&gt;
      &lt;a href="#/signin" ng-click="signin()"&gt; Sign in &lt;/a&gt;
   &lt;/section&gt;
  
   &lt;section ng-controller="b" ng-show="auth = true"&gt;
      &lt;a href="#/signout" ng-click="signout()"&gt; Sign out &lt;/a&gt;
   &lt;/section&gt;
  </code></pre>
  
  <p>The sign in is working well</p>
  
  <p>this is my Controller </p>
  
  <p>login Controller</p>
  
  <pre><code> function ($scope, Service){
   $scope.auth = true;
   $scope.signin = function($event, userID, passwd){ 
  
                   Service.signin(userID,passwd).then( 
                          function (response){
                              $scope.auth = true; 
                    });
   }]).
  </code></pre>
  
  <p>logout Controller</p>
  
  <pre><code>  function ($scope, Service){
    $scope.auth = false; 
    $scope.signout = function($event){ 
                   Service.signout().then( 
                          function (response){
                              $scope.auth = false;    
                    });
    }]).
  </code></pre>
  
  <p>those 2 log out and log in links are basically in my main page. I dont want to create a lot of pages, therefore I want to hide each other. When the user click the log in link, it will run the angularjs router, in this case /login, there is another templateURL for the form and it will be appended directly to the main page. Once the user has typed in the userID and password, the user need to click submit button, this is the code</p>
  
  <pre><code>&lt;form role="form" name="form1"&gt;
      &lt;label for"userID"&gt;UserID&lt;/label&gt;&lt;input type="text" id="userID" ng-model="userID"&gt;
      &lt;label for"passwd"&gt;Password&lt;/label&gt;&lt;input type="text" id="passwd" ng-model="passwd"&gt;
      &lt;button data-ng-click="signin($event,userID,passwd); reload()"&gt;Login&lt;/button&gt;
  </code></pre>
  
  <p></p>
  
  <p>the reload() function will directly refresh the page. I am using the $window.location.reload()</p>