Global JS Object in Launchpad
We tried it so far the "normal" JS-way: window.myGlobal = ... in the Component.js - file on one of the apps. But the first problem is, the file is only executed, if the app gets started and the second problem is that we can't access the variable in another app. It is undefined, although all apps share the same window object: How to get your SAP UI 5 apps to work like SAP Fiori Apps in SAP Fiori Launchpad.
All ideas are welcome.
Thanks in advance,
Edit: I found out so far, that the apps are executed inside an iframe and so they do not share the same window object.
you're absolutly right in general. But in our scenario it is necessary that the apps share data on client side, because sometimes the state of one app depends on the state of another app.
The solution in our case was to deploy the app as components, not as standalone apps inside launchpad via the index.html. The problem is, although Component.js and index.html share the same folder at development time they are in different folders on runtime. So we had to find the right path. It is a bit confusing, but here the concret example:
Works NOT: <host:port>/sap/bc/bsp/sap/myapp/Component.js
So now the app no longer running as iframes inside the launchpad and share the same window object.