angular - 单水疗 Angular 10 中的路由问题
问题描述
我正在使用带有 Angular 10 应用程序的单水疗中心。路由有问题,当我使用“activeWhen:[”/“]”加载应用程序时,它工作正常,但如果我添加路由,我会收到“404(未找到)”错误。这是我的配置,有什么问题吗?
<script>
Promise.all([System.import('single-spa')]).then(([singleSpa]) => {
const { registerApplication, start } = singleSpa;
registerApplication({
name: "uiservice11",
app: () => System.import("uiservice11"),
activeWhen: ["/"]
});
registerApplication({
name: "uiservice1",
app: () => System.import("uiservice1"),
activeWhen: ["/home"]
});
start({
urlRerouteOnly: true,
});
});
</script>
解决方案
推荐阅读
- php - Laravel Validation Array 必须包含一个 boolean 为 true 的项目
- azure-pipelines - Azure 管道模板 - 选择要运行的阶段
- javascript - svelte + rollup 中的环境变量
- php - ACF 未在 wp 主题的页脚中显示值
- vue.js - 如何从另一个数据属性访问 Vuejs 数据属性?
- bash - 命令在 docker 中手动成功,但不是通过 bash 脚本
- java - 在运行时将信息保存在 JAR 旁边
- amazon-web-services - 使用 AWS KMS 进行 PGP 解密?
- spring - Spring 异常处理程序 - 处理多个异常
- javascript - 脚本 google sheet 表单自动完成和填充单元格