模块联合加载嵌套应用程序路线

发布于 2025-01-19 11:24:55 字数 368 浏览 3 评论 0 原文

我在以下结构中有一个应用

---主应用程序(路由器outlet>)
- animal()
-仪表板。 (URL应用/狗/仪表板)

- animal(路由器outlet>)
-dashboard(URL应用/CAT/仪表板)

现在,我想将仪表板组件,即Dogdashboard和Catdashboard分开,然后通过模块联合通过动物组件的路由器加载它。

我能做什么到目前为止,要创建主应用程序作为外壳,为Dogdasboard创建另一个应用程序,但是当我通过遥控器导航到猫仪表板时,使用了父Router-outlet,而不是孩子(动物路由器出口)。知道这是否可以做到吗?

I have a app in the below structure

---Main App (router-outlet>)
--Animal ()
-Dashboard. (url app/dog/dashboard)

--Animal (router-outlet>)
-Dashboard (url app/cat/dashboard)

Now I want to separate the Dashboard component, i.e DogDashboard and CatDashboard and load it via the router-outlet of Animal component through module federation.

What I could do so far is create the Main App as shell, create another app for Dogdasboard, but when I navigate to cat dashboard via remotes, the parent router-outlet is used and not the child (animal router outlet). Any idea if this can be done?

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

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

发布评论

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

评论(1

野鹿林 2025-01-26 11:24:55

您可以将匹配器与 @angular-Architects/module-federation-tools的“ startswith”一起使用

https://www.angulararchitects.io/en/aktuelles/multi-framework-and-version- Micro-Frontends-with-Module-federation-your-4-steps guide/

You can use the matcher with the "startsWith" of @angular-architects/module-federation-tools

Take a look: https://www.angulararchitects.io/en/aktuelles/multi-framework-and-version-micro-frontends-with-module-federation-your-4-steps-guide/

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