on 2020 Jul 04 2:32 PM
Hi Honam,
The best way to have the json file loaded is already have it resolved with respect to your project module path.
var sProductsJsonPath = jQuery.sap.getModulePath("com.prashil.test", "/json/products.json");
var oProductModel = new sap.ui.model.json.JSONModel(sProductsJsonPath);
This way you no matter if your UI5 app is launched from Fiori Launchpad or standalone or SCP, it will always resolve the proper reference.
Thanks
Prashil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
69 | |
11 | |
10 | |
10 | |
9 | |
9 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.