Pentiado/angular-lazy-img

filter search

Closed this issue · 3 comments

Hi, I really like the angular-lazy!

One problem, if I've a ngRepeat and use the search:

When the filter execute the search, the image still not loaded until I scroll the page.

Any idea if this is fixable ?

By using

$rootScope.$emit('lazyImg:refresh');

You can trigger lazy load to refresh. My problem is that I'm using that on a filtered search (so that each character searches. The search goes fast without it, but then the user has to scroll to get images to show up. But when I trigger this on change, there's a lot of lag. Not sure why.

After more than a year I think you've found solution : ) but I built simple demo with search /demo/search.html and by running $rootScope.$emit('lazyImg:refresh') images loads as expected.

FWIW, this approach is not working in my app. The filter filters items, but the images don't change; the one's originally there stay there.