lorenzofox3 / lrInfiniteScroll

directive to register handler when an element is scrolled down near its end http://lorenzofox3.github.io/lrInfiniteScroll/index.html
217 stars 46 forks source link

Update lrInfiniteScroll.js #5

Open orszaczky opened 9 years ago

orszaczky commented 9 years ago

In my tests handler always evaluated to noop, so the function never got called. To get it working without an isolate scope, I used $apply() directly in the promise timeout function, which $eval()s its argument against the scope.

lorenzofox3 commented 9 years ago

sounds like a scope issue, plunker ?

lorenzofox3 commented 9 years ago

lol, this is not what I call a running example. Seriously, what do you want me to do with a bunch of HTLM tags ? :) Add the javascript at least the basics to be able to see the problem (I don't need to see all your application), Just let the part of the code useful to reproduce the problem (remove the noise), for example: we don't need all the style attributes on the images tags

You'll see, often when people try to set up a real and clean plunker(or jsfiddle) to reproduce the issue...the issue disappear !

hirbod commented 9 years ago

I had the same problem..

 <section class="gossip" lr-infinite-scroll="loadMore()">

doesn't load anything.

 <section class="gossip" lr-infinite-scroll="loadMore">

works perfectly (without ( ))

Maybe I have to try this PR, but actually, everything works at the moment - even if I don't understand why.

hirbod commented 9 years ago

I can confirm: this PR fixed my issues. Please merge it. Angular 1.3.0

wajih775 commented 8 years ago

working absolutely fine.