0

I'm looking for a simple and good way to load my photos on my Angularjs app. for exemple, I had, a img

<img ng-src="{{myPathToImg}}">

and I want to display another img ( svg spinner ) like somes point who mooves during the image download. I think I have to use a directive, but I don't know how to load with async my img

miton18
  • 253
  • 1
  • 2
  • 8
  • Are you asking about how to render a placeholder image while another image is loading? – New Dev Sep 01 '15 at 21:54
  • 1
    I think this http://stackoverflow.com/questions/20984183/best-way-to-preload-images-with-angular-js will help you! – xSaber Sep 01 '15 at 22:14
  • you can default value of `myPathToImg` to loader and then populate it again with actual image. or use `ng-if` / `ng-show` – batmaniac7 Sep 01 '15 at 23:45

0 Answers0