1

I'm building an ionic 3 app.

I created a JSON file in src/assets/data/markers.json and added some images in src/assets/img/image.png

When i run ionic serve i see my new files in VS Code in the www folder, but i don't see them in chrome or firefox in the sources tab. I even created a new project and pasted the src folder in the new project, but still no luck..

Any help much appreciated!

sebaferreras
  • 44,206
  • 11
  • 116
  • 134
olivier
  • 2,585
  • 6
  • 34
  • 61
  • 1
    A browser would only know about and thus load an asset if you referenced it somewhere. Ionic won't do anything special to include your assets besides copying them to the output folder. – Rory Jul 14 '17 at 11:39

1 Answers1

0

Your assets like photo's should be placed in src/assets/img/ and then you can call those assets in your ionic app like <img src="assets/img/myImg.png"> I think there are resources in watching in the src folder. But if you load your assets like above, you will see them in your browser.

Answer found here: Where do Images go in IONIC 2

Hope it helps you in the right direction,

Ben
  • 563
  • 3
  • 8