title: AngularJS window dimensions
body: <p>I am trying to access the window dimensions with AngularJS 1.3 to ultimately calculate the orientation of the screen.</p>
  
  <p>None of the examples I find online works and I am not sure why.</p>
  
  <pre><code>angular
      .module('myApp')
      .controller("IntroCtrl", function ($scope, $window) {
  
          var window = angular.element($window);
  
          console.log('WindowWidth ' + window.innerWidth);
  });
  </code></pre>
  
  <p>The console reports:</p>
  
  <pre><code>"WindowWidth undefined"
  </code></pre>
  
  <p>What is the correct way to read the values? </p>