I created a sapui5 application and added northwind odata service in it.And in init method of component.js i wrote below code.Page is not loading what am i doing wrong.Iam using cloud trial version of sapwebide.Please help
var mConfig = this.getMetadata().getConfig();
var sServiceUrl = mConfig.serviceConfig.serviceUrl;
// Create and set domain model to the component
var oModel = new sap.ui.model.odata.ODataModel(sServiceUrl, {
json: true,
loadMetadataAsync: true
});
oModel.attachMetadataFailed(function() {
this.getEventBus().publish("Component", "MetadataFailed");
}, this);
this.setModel(oModel);
Regards