Closed bekzhan7 closed 8 years ago
Can you share the solution for this ? Just in case someone runs into the same issue
Yes, my problem was that items
scope variable was empty when view loads. It happened because of asynchronous jsonp request.
So, instead of filling local variable items and then assigning it to a scope variable, i filled scope.items directly, like
$scope.items = [];
Gallery.photos(albumId).success(function(data){
if(data.response && data.response.count>0){
var photos = data.response.items;
for(var i = 0;i<photos.length;i++){
$scope.items[i] = {
src: photos[i].sizes[photos[i].sizes.length-1].src,
sub: photos[i].text,
thumb: photos[i].sizes[0].src,
}
}
}
)}
Hi, im getting this error when trying to fill items with images that i got from Rest request with jsonp method. Its popping this error then loading of my images are done. How we can fix this issue?
And services.js return promise of jsonp method.