Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error $window.height is not a function - ngInfiniteScroll with angularjs

Tags:

angularjs

I'm trying to load data dynamically with ngInfiniteScroll and I'm having a problem where I'm getting $window.height is not a function.

Here's a fiddle, it's not quite working and I'm not sure why, the data doesn't display on the fiddle yet it does on my local machine.

I'm using ngInfiniteScroll and I'm getting this error:

TypeError: $window.height is not a function

windowBottom = $window.height() + $window.scrollTop();

Anyone have any idea why this error appears and how to sort it?

Thank you

like image 864
user1532669 Avatar asked Nov 27 '14 00:11

user1532669


1 Answers

For me, including jQuery before Angular in html did the trick ...

like image 150
martijnonderwater Avatar answered Oct 19 '22 06:10

martijnonderwater