angularjs $window.height is undefined

angularjs

Solution

`$window` is a wrapper for `Window` , and `Window` has no `height` property . You can use `innerHeight` instead, like: `$scope.popupHeight = $window.innerHeight;`

Problem

$window.height is undefined. Where is the problem? ``` FoodSearchControllers.controller('homeCtrl', ['$scope', '$http', '$window', 'filterArgs', function($scope, $http, $window, filterArgs) { $scope.popupHeight = $window.height; console.log($scope.popupHeight); }]); ```

Original source