cancel
Showing results for 
Search instead for 
Did you mean: 

how to set relative path in sapui5?

honam_yu
Explorer
0 Kudos
4,639

hi experts

I make sapui5 project above.

I access products.json file from App.controller.js

I use relative path --> ../json/products.json. but I cannot load json file.

And I use ./json/products.json.

why different general relative path?

thanks

View Entire Topic
prashil
Product and Topic Expert
Product and Topic Expert

Hi Honam,

Please try with sap.ui.require.toUrl("com/prashil/test/json/products.json") where my namespace is "com.prashil.test".

Thanks

Prashil

honam_yu
Explorer
0 Kudos

Hi Prashil

Thank you. It is correct.

Best regards

Honam