Angular Microfrontend如何在Shell应用程序中设置Cookie?

发布于 2025-02-10 02:24:38 字数 195 浏览 1 评论 0原文

我将一个共享的小部件(例如:日历小部件)视为一个微观前端,可以在我们组织中的多个应用程序中消费。消耗的应用程序按需加载了我们的微观前端,并且在加载后,作为微观前端,我们没有任何方式与消费应用程序进行通信。我想在消费的应用程序端设置cookie或localStare,该如何将cookie或localstorage变量从我们的共享窗口小部件(微货式)设置为消费应用程序。请建议。

I am exposing a shared widget (ex: calendar widget) as a micro frontend that can be consumed across multiple applications in our organization. The consumed application loads our micro frontend on demand and after it gets loaded, as micro frontend, we don't have any way to communicate with the consuming application. I would like to set a cookie or localstorgage on the consumed application end, how can I set a cookie or localstorage variable from our shared widget (microfronetned) to the consumed application. Kindly advise.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

向日葵 2025-02-17 02:24:38

您可以在Ngoninit Hook中进行共享应用程序中的事件,并在Shell中缓存该事件吗?

you can triger event in ngOnInit hook for shared app and cache the event in shell right?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文