In my application, several images are loaded, however when the view is opened, you can clearly see each image being loaded, by this I mean the top half of the image appears and it keeps increasing till the full image is displayed. I do not want this.
My images are inside an ng-repeat
, what i want to do is when the page is loaded all images are set to a default image that comes bundled with the app. Now after my function has returned all new image URLs and those images have been fully loaded then they should replace the default images.
So basically like this:
- Open view
- Set all images to
default.jpg
- Get data.
- Wait for new images to load fully.
- Replace default images with new image URL fetched from the server.
I have never done this before and do not know how to go about it.
You can write like this:
Then you can use a directive like: