问题是当我继续localhost:4200/register
时,它会将我重定向到localhost:4200/auth
当我将路径匹配完全放在寄存器中时,我可以访问该页面。但是如果没有路径匹配,我无法访问,它将我重定向到auth
//auth is the authentification page, it has the pathMatch full
{
path: '',
redirectTo: '/auth',
pathMatch: 'full'
},
{
path: 'auth',
component:AuthComponent
},
//register has no pathmatch
{
path: 'register',
redirectTo: '/register',
},
{
path: 'register',
component:RegisterComponent
},