问题描述
我了解如何在工作区内创建和使用多个页面(或应用程序)并构建它们。我有点困惑你如何让这些多个应用程序相互通信?
让我说我的工作区中有两个应用程序 - App1和App2。 >
如果值足够简单(如用户ID),我可以使用路由并使应用程序相互通信。
如果我必须将多个id或数据从App1发送到App2?
我想你有几个选项可用。
-
URL实例化第二个应用程序时解析的参数:
http:// example.com/app2.html?one=1
-
位置的锚点:$ b $ b
http://example.com/app2.html#one:1
-
如果应用程序托管在同一个域上您可以使用(只要他们可以使用客户端)
-
设置一个cookie
I understand how to create and use multiple pages(or apps) within a workspace and build them. I am kind of confused about how do you make these multiple apps talk to each other ?
lets say I have two apps in my workspace - App1 and App2.
I can use routing and make apps talk to each other if the value is simple enough(like a user id).
What If i have to send multiple id's or data from App1 to App2 ?
I think you have a few options available.
URL Parameters that you parse when instantiating the second application:
http://example.com/app2.html?one=1
Anchor in the location:
http://example.com/app2.html#one:1
If the applications are hosted on the same domain, you can use something like SessionStorage or LocalStorage (provided they are available to the client)
Set a cookie
这篇关于Secha ExtJs工作区和多个页面(应用程序)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!