single-spa-angular 当我们刷新浏览器时,微前端应用程序中的多个路由不起作用GitHub 代码可用

问题描述

有人可以帮我解决这个问题吗?任何帮助将不胜感激 。 我有一个简单的角度应用程序,其中包含下面提到的多条路线

  1. App1Route1
  2. App1Route2
  3. App1Route2

我有一个主要的应用程序组件,用于显示这些路线

enter image description here

我想为这个应用程序实现 single-spa-angular,我遵循了这个 link 中提到的步骤,并按照 {{ 3}}。

suggestion

进行这些更改后,我将能够使用如下所示的 single-spa 运行应用程序

enter image description here

但是路由不起作用。最后我通过修改 app.routing.module.ts 文件解决了这个问题,如下所示

enter image description here

现在我可以在使用链接导航路线时看到输出

enter image description here

enter image description here

enter image description here

现在我遇到的问题是,当我在浏览器中使用路由名称刷新页面时,它无法正常工作并得到一个空白页面(在正常的角度应用程序中工作正常)

enter image description here

整个代码和重现此错误的步骤已上传

enter image description here

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)