I am trying to load models into a view. i am able to load the model when i do not give any name for the model like:-
sap.ui.getCore().byId("mao").setModel(oModel);
But the model is not set to view if i give like the below. I am not getting any error also
sap.ui.getCore().byId("mao").setModel(oModel,"myModel");
I am using load data to load my data
var oModel = new sap.ui.model.json.JSONModel();
oModel.loadData(servicePath);
sap.ui.getCore().byId("mao").setModel(oModel);