I found a way to redirect the "folder" route to "folder /: id" with an empty id parameter:
{ path: 'folder', redirectTo: 'folder/', pathMatch: 'full', }, { path: 'folder', children: [ { path: ':id', canActivate: [AuthGuard], component: DocumentsComponent, }, ] }
* Please note that redirection must be first.
source share