1

I'm having issues with displaying images after running

ionic run ios

I have the default ionicframework template running with the sidemenu, and have not changed the app directory structure at all.

I have an inline css to specify a background image from an ng-repeat directive for categories.

style='background: url("{{category.img}}")

I've tried ../img/picture.jpg, /img/picture.jpg and img/picture.jpg. None seem to work. Please help!

Thanks in advance

Sherwyn Goh
  • 1,352
  • 1
  • 10
  • 19
  • possible duplicate of [How to display a local:// image in ionic framework + cordova?](http://stackoverflow.com/questions/22886437/how-to-display-a-local-image-in-ionic-framework-cordova) – Sherwyn Goh Dec 03 '14 at 09:01

1 Answers1

7

I had the same issue, my project structure look like this:

/www/
    /images/
    /views/page.html
    index.html

and in page.html img links was: <img src="images/image.png" ../> and it worked for both web and mobile build.

Hope this helps.

Rasalom
  • 3,101
  • 3
  • 21
  • 29