0

I get such an error with outlet: 'xxx'

Cannot match any routes. URL Segment: 'server/basic

Router:

export const routes: Routes = [
  {path: '', component: DashboardComponent},
  {
    path: 'server', component: ManagementComponent,
    children: [
      {path: 'basic', component: ManagementDetailsComponent, outlet: 'xxx'}
    ]
  }
];

@NgModule({
  imports: [RouterModule.forRoot(routes)],
  exports: [RouterModule]
})

ManagementComponent:

<div>
    <router-outlet name="xxx"></router-outlet>
</div>

Without nested outlet seems to work but its not what I want to have.

userbb
  • 2,148
  • 5
  • 30
  • 53
  • How do you get the error? Calling router.navigate or with a routerLink? Can you show your code? – David Apr 11 '20 at 08:05
  • 1
    Think this has been answered https://stackoverflow.com/questions/58954703/angular-8-nested-routes-and-multiple-router-outlet-doesnt-work – Yoni Affuta Apr 11 '20 at 08:11
  • @David non of these. Just changing url in browser like: http://localhost:4200/server (it works) http://localhost:4200/server/basic (not working) – userbb Apr 11 '20 at 09:15
  • @YoniAffuta got right. Named router-outlet is not needed there – userbb Apr 11 '20 at 09:17

0 Answers0