在不同存储库中共享两个Angular微前端应用之间的数据。

huangapple go评论43阅读模式
英文:

Share data between 2 Angular micro frontend apps that reside in different repository

问题

我有2个角度微前端应用程序,它们位于不同的存储库中。

Angular外壳应用程序 - 存储库1

Angular微前端应用程序1 - 存储库2

Angular微前端应用程序2 - 存储库3

是否有办法在外壳应用程序和微前端应用程序之间共享数据?

我正在使用**@angular-architects/module-federation**来创建微前端应用程序。

英文:

I have 2 angular micro frontend apps residing in different repository

Angular shell app -- Repository 1

Angular Micro frontend app1 -- Repository 2

Angular Micro frontend app2 -- Repository 3

Is there any way to share data between shell app and micro frontend apps

Iam using @angular-architects/module-federation for creating micro frontend apps

答案1

得分: 1

使用 new CustomEvent(),我们可以发送消息,使用 fromEvent(),我们可以接收消息。

英文:

By using new CustomEvent() we can send messages and using fromEvent() we can receive the messages

huangapple
  • 本文由 发表于 2023年2月10日 15:43:13
  • 转载请务必保留本文链接:https://go.coder-hub.com/75408191.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定