title: AngularJS - ng-show with scope variable not working
body: <p>I am trying to hide/show certain things when the orientation of the phone changes.</p>
  
  <p>Here is my view:</p>
  
  <pre><code>&lt;div ng-controller="ModelCtrl"&gt;
      &lt;p ng-show="isLandscape"&gt;Landscape - {{ isLandscape }}&lt;/p&gt;
      &lt;p ng-show="!isLandscape"&gt;Portrait - {{ !isLandscape }}&lt;/p&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>And here is the controller snippet:</p>
  
  <pre><code>    $scope.isLandscape = false;
  
      // Listen for orientation changes
      window.addEventListener("orientationchange", function() {
          // Announce the new orientation number
          switch(window.orientation) 
          {  
            case -90:
            case 90:
              $scope.isLandscape = true;
              alert($scope.isLandscape);
              break; 
            default:
              $scope.isLandscape = false;
              alert($scope.isLandscape);
              break; 
          }
      }, false);
  </code></pre>
  
  <p>I am able to alert the correct value of isLandscape on orientation change, but it seems it does not update the view, so it is always saying its in "portrait mode - true".</p>