Ionic 5 - read Json File in asset folder

How do I read a JSON file that’s located in the Assets folder?

In Angular/Ionic 5 I did the following:


I’m using Axios in order to retrieve external API, and that works fine, tried to use this here as well, but couldn’t get that to work.

This is the advised way for local assets in assets folder (angular at least). What is going wrong?

And how does that relate to axios (which I dont know)

I figured what I was doing wrong. I put the Assset folder in the src/ folder, instead of Public folder.

Worked better now :slight_smile:

In regards to using Axios vs http, not sure how to use http - that’s all :slight_smile: