Can anyone tell how to access the oData Model(Manifest.json) inside the Init()
of the Controller?
I tried to Access through Component.js. Tried Below Code in Component.js
var oModel = this.getModel("destinModel");
this.setModel(destinModel,"Model");
in Controller Init()
Function--
var oComponent = this.getOwnerComponent();
var oModel = oComponent.getModel("Model");
This didn't work when I used it inside Init Function, but it worked inside onAfterRendering()
.
I need to access the Model Inside the Init() of the Controller.. if I can't please suggest me any alternative ways to access the Model..