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