manidos
manidos

Reputation: 3464

Regular outlet inside named outlet

Component TwoComponent is displayed inside a regular router-outlet and has named router-outlet inside its template. I'm using the following code to display child routes (in a manner similar how it's used with regular outlets), but it doesn't work.

 { 
    path: 'two', 
    component: TwoComponent, 
    outlet: 'named',
    children: [
      {
        path: 'child',
        component: TwoChildComponent       
      }
    ]
  }

Please, check out this plunkr https://embed.plnkr.co/m1zkHVIfIvDzL6a5PfBB/

Upvotes: 0

Views: 193

Answers (1)

yurzui
yurzui

Reputation: 214017

I guess this should work for you

[routerLink]="[{ outlets: { named: 'two/child' } }]"

Just remove square brackets.

Updated plunker

Upvotes: 1

Related Questions