Files not getting load in device/browser

Hi,
I am creating folder in assets folder which consist image and json file. While running ionic serve it get added in www->assets but when i m running in browser or device. I am getting 404. I can’t see neither in network nor in source.

I seen somewhere people suggesting gulp.js to load. Can anyone help me how to resolve this by using gulp or any other option.

Have you tried to build instead of serve?

You’re paths are wrong. I know this via clairvoyance since you didn’t bother to post any code when asking people to help you with your code.

2 Likes

Yes, I have build for android and ios.

Path is not wrong. I m loading json file in json. but getting error 404 and I am sure it is not wrong path. I read somewhere when we build app unused file and folder not added to the project. am I right ?

How can you be so sure? “Because it works under ionic serve” is not a valid answer, as it is more forgiving of bad paths than on-device builds are.