【发布时间】:2020-12-29 16:09:06
【问题描述】:
我在直接访问辅助路由时遇到问题。当我在本地访问 /home/(post:12) 时,一切正常。但是当我在将应用程序部署到 github 页面时尝试这样做时,会出现 Wild 404。
基本上辅助路由是加载弹窗模式。
<router-outlet name="post"></router-outlet>
这里是路由器模块:
RouterModule.forRoot([
{
path: 'home',
component: ShellComponent,
children: [
{
path: ':postId',
component: PostEntryComponent,
outlet: 'post'
},
{
path: '',
redirectTo: 'home',
pathMatch: 'full'
}
]
},
{path: '**', redirectTo: 'home'}
])
我想让它像在本地服务器上一样工作。有什么想法吗?
【问题讨论】:
标签: angular routes angular-routing angular-auxiliary-routes