I've got this routes
AppRouting
{
path: 'user',
canLoad: [AuthGuard],
loadChildren: () =>
import('./user/user.module').then((m) => m.PublicUserModule)
}
UserRouting
{
path: '',
component: PublicUserPageComponent,
canActivate: [UserPhonesCheckGuard],
children: [
/*{
path: '',
pathMatch: 'full',
redirectTo: 'check'
},*/
{
path: 'account',
loadChildren: () =>
import('./account/user-account.module').then(
(m) => m.PublicUserAccountModule
)
},
{
path: 'check',
loadChildren: () =>
import('./check/user-check.module').then(
(m) => m.PublicUserCheckModule
)
}
]
}
Using UserPhonesCheckGuard depending on some conditions I want to redirect or to the check or to account children route but with
canActivate()
return this.router.parseUrl('/user/check');
}
the browser go nuts :(
What path should I use?