in my app.js i wrote
app.config(['lazyImgConfigProvider', function(lazyImgConfigProvider){
setTimeout(function(){
var scrollable = document.querySelector('#int-scroll');
lazyImgConfigProvider.setOptions({
offset: 100,
errorClass: 'error',
onError: function(image){},
onSuccess: function(image){},
container: angular.element(scrollable)
});
},1000)
}]);
So I am using lazy load in listing page. But app.config runs on first load. So if I refresh the listing page(whole app on listing page),it works fine. But when i come from home page it does not work because app.config wont run again.
I want to run the code above when i reach listing controller. Please help
in my app.js i wrote app.config(['lazyImgConfigProvider', function(lazyImgConfigProvider){
setTimeout(function(){ var scrollable = document.querySelector('#int-scroll'); lazyImgConfigProvider.setOptions({ offset: 100, errorClass: 'error', onError: function(image){}, onSuccess: function(image){}, container: angular.element(scrollable) });
},1000)
}]);
So I am using lazy load in listing page. But app.config runs on first load. So if I refresh the listing page(whole app on listing page),it works fine. But when i come from home page it does not work because app.config wont run again.
I want to run the code above when i reach listing controller. Please help