我的应用程序在单击按钮时重定向到“localhost:4200/teams/team1”,在该按钮上我初始化了 paramValue(name) 并且也在加载正确的组件,但是当我刷新浏览器时,它无法获取路由参数值(name)它重定向到 PageNotFoundComponent。请帮我找到解决方案。
const routes: Routes = [
{path:'',component:LandingPageComponent},
{path:'teams/:name', canActivate:[AuthGuard], component: TeamComponent},
{path:'error-handler',component:ErrorHandlerComponent},
{path: '**', component:PageNotFoundComponent ,pathMatch:'full'}
];