How to load local Json file in Ionic 2


#1

Hi,

I have one json file under “assets/json/data.json”. I’m able to load this json while testing on browser however after installing APK on Android json is not loading.

Please help me to find the solution for this.


#2

How can you load in browser ? What is your code ?


#3

Try it www/assets/json/data.json


#4

Still not working. I tried above mentioned path


#5

You still haven’t answered @hmtylmz’s question about the code that is attempting to load this resource. And please don’t post it as another image.


#6

Issue got fixed. For locating local json i used “file:///android_asset/www/” path format.


Images and data from json not shown on Android tablet