I’m using right now as you suggested the ng-repeat and ng-src .
And is putting the pictures right, but the slide still does not work I can see at the inspector in chrome I’m getting all the images well and is repeating the <ion-slide> it is supposed to be, but only shows me the last image from my array and the slide does not work.
I had tried this hypothesis but remains the same, I tested again now but still with the same problem.
I have one more slider in my app but is working with local pictures, i don’t have any problem whit that one, only in this specific case.
There was one time I woke up my android and the app was open and strangely it worked well, it was the strangest thing that has happened so far…
Every time i resize the chrome window after it have every image loaded it works fine…
Then, on your controller you must inject the service established previously.
Now, your $scope can access the json object, which contains the data you want. Just call the service and get the object.
SERVICENAME.list().then( function (d) {
//list() is a function of mine, defined on the service to return my data the way I want. it's nice when you don't want to send all the data at the same time.
$scope.images = d;
//$scope.images now contains the json object, and you can use it on the view.
});
@tcn
you are hanging in the ion-slide-box in your dom -> without any image (because your image request is async) -> thatwhy the height, width and scrolling calculation is not correct.
I added an ng-if to the ion-slide-box to add the whole slide-box only if there is something on $scope.images.
I cleaned up your code… removing the unnecessary timeout.
Keep in mind if you are sending a http-request you have the success and error callback -> you should hide your loading indicator only if the request has finished (and you should hide it in both cases, because if not and your request fails… the user sees the loading indicator the whole time)
you can find the link to my code pen in a private message.