Pass oData between one controller to another
I'm developing an app in SAPUI5 where the data come the gateway service from SAP.
Way I received my oData.
But in the second view I need the same data that in first view. I use this.getRouter().navTo("page2"); for navigate to another view.
This is my first view
And this is second view
Please I need your help because I'm charging twice the same data.
Do you have a reason to set your model to the core? This will be critical if you run several apps with the same runtime (as in FLP or other containers)
I would recommend to set it to the component, means you should either move the coding above to you component or call
This will make the model accessible to all your views by the name.
Actually if you set the model to the core as you do it should already be available to all your views.
If you need to do additional modification you can call
//or if set on the component
//or for all cases