1

So I have a page where I'd like to wait till the images have loaded before the item gets rendered into the page.

There's a jquery plugin that I've used in the past to wait for images. It'll give you them in a callback / jquery deferred object.

The issue I was running into before was waiting for children element's directives to run. So I use <img ng-src='values'> because I'd prefer to avoid having the image try to hit a different server before.

The way I got it to work was via a $timeout(fn,0) which delays execution till the next trip around. However, I don't really like this, and think it's inelegant.

Is there a better way?

RandallB
  • 5,415
  • 6
  • 34
  • 47

0 Answers0