Pentiado/angular-lazy-img

angular-lazy-img not working on safari browser

Opened this issue · 0 comments

I am using angular-lazy-img with angular 1.5.8. The image lazy load is working fine on chrome but not working safari.

here is the sample img tag---
< img id="list-img-id" class="list-imgs lazy list-row-img" lazy-img="{{near.coverImage}}" alt="{{near.displayName + ' ' +near.displayNameLocation}}" style="" >

here is lazyImgConfig function---

config(['lazyImgConfigProvider', function(lazyImgConfigProvider) {
setTimeout(function() {
console.log('lazyImgConfigProvider',lazyImgConfigProvider);
var scrollable = document.querySelector('#hawai');
lazyImgConfigProvider.setOptions({
offset: 1, // how early you want to load image (default = 100)
errorClass: 'error', // in case of loading image failure what class should be added (default = null)
successClass: 'success', // in case of loading image success what class should be added (default =
null)
onError: function(image) {}, // function fired on loading error
onSuccess: function(image) {}, // function fired on loading success
container: angular.element(scrollable) // if scrollable container is not $window then provide it here
});
}, 1000)

}]);

please let me know whats the issue and how can i fix it.