JSON Bidding:
onInit : function () {
// set explored app's demo model on this sample
var oModel = sap.ui.model.json.JSONModel("model/products.json");
this.getView().setModel(oModel);
}
Note:
In JSONModel() should define path of the json file
To bind data in List:
<List
headerText="Products"
items="{/employee}" >
<StandardListItem
title="{Name}"
counter="{Quantity}"/>
</List>
No comments:
Post a Comment