Pentiado / angular-lazy-img

Lightweight lazy load images plugin. Only 1kb after gziping. Pure JavaScript, only Angular as dependency.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Using a scrollable container generated dynamically by controller

jup31 opened this issue · comments

Hello everybody,

I face an issue to work with the scrollable container as my container is generated using ng-view, it doesn't exist during the configuration step. Do you have any idea how I can solve this issue or is it dependent to the library ?

I had added a question on stackoverflow regarding this : Stack question linked

Thanks in advance,
Julien

Soory I hadn't seen issue 4, I will test it.

Thanks for Pull Request!

No problem even if it doesn't solve fully my issue, the scrollable container is now good. The only issue is when scrolling quick the images aren't loaded. Did you know why it is not working ? I have look for scroll and touchMove event implemented in the code but I don't understand why image are only loaded if i scroll really slow and not fast.

https://github.com/Pentiado/angular-lazy-img/blob/master/src/angular-lazy-img-logic.js#L45
Function that checks images is wrapped in throttle for performance reasons. Maybe it's the culprit in your case?

I don't have time now to dive deep into this issue. Building start-up isn't an easy job. If you find the solution for your problem, feel free to send another pull request.