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