Closed stsvilik closed 11 years ago
Could probably do with adding some more events than just AtEnd.
If you want infinite scroll, I've heard good things about this: https://github.com/BinaryMuse/ngInfiniteScroll
I intend to use this on mobile devices where the cropping of elements from top/bottom is essential for performance thats why I think your implementation is much better :). So the only thing is missing is those events that could let me know when I'm approaching the end of my data source. P.S. What you did is great and very useful - keep up the good work ;)
I've been thinking a bit more about this and now that the state variables are exposed (using ngModel), it shouldn't be necessary to add events. Simply watch the model and when model.firstVisible + model.visible === model.total
, there is your end event.
I'll try that - thanks. Is that on your latest branch?
It should be in the 0.4.0 release (so getting the latest via bower will work), but also on the master.
Example added to the demo in 3ec84af23b69810e9bce16446eb31a9af642a16d
Is it possible to add an event broadcast that fires when source of data is at or near the end (threshold configurable)? This way you can also make this repeater "infinite" since now you can append more data to the source once the end is reached/approaches - think ajax based pagination.