'Unable to do Navigation with relativeTo property in angular 13?
I am unable to do navigation with relativeTo property in Angular 13 Please find the code below
this.router.navigate(['../author'], { relativeTo: this.route, queryParams: {sid: this.selectedStudy.id} });
please find below routing file
const routes: Routes = [
{
path:'',
component: FullComponent,
children:[
{
path:'',
canActivate: [AdminGuard],
component: LandingComponent
},
{
path: 'author',
canActivate: [AuthGuard],
loadChildren: () => import('../authorcoauthor/authorcoauthor.module').then(m => m.AuthorcoauthorModule)
},
{
path: 'reviewer',
canActivate: [AuthGuard],
loadChildren: () => import('../csr-reviewer/csr-reviewer.module').then(m => m.CsrReviewerModule)
},
{
path: 'approver',
canActivate: [AuthGuard],
loadChildren: () => import('../csr-approver/csr-approver.module').then(m => m.CsrApproverModule)
},
]
}
]
can any one help me on this.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|