S
S
Sergey2015-04-26 20:00:37
Angular
Sergey, 2015-04-26 20:00:37

How to get window height and width without jQuery?

How do I get the height and width of an existing screen without jquery?

var w = angular.element($window);
    $scope.getHeight = function() {    	
        return w.height();
    };

Do I understand correctly that there is no such property as height in $window? Is there if you include jquery only? is it possible with the built-in jqulite?
So it turns out, but if you just do it in the controller (I will transfer everything to the directive later, I know that everything with the DOM is necessary with the directive), it swears atprop

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Pashenka, 2015-04-26
@TsarS

thousand

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question