我正在尝试在我的应用中使用名为outlet的工具。
这是我的路线配置:
{
path: 'contact',
children: [
{ path: '', component: ContactComponent, pathMatch: 'full' },
{ path: 'list', component: ContactlistComponent },
{ path: 'hold', component: ContactOperationComponent, outlet: 'popup' }
]
}
以下是我在AppComponent
中使用主router-outlet
<router-outlet name="popup"></router-outlet>
这是我的routerLink,它正在调用我的Component
:
<a [routerLink]="['/contact',{outlets:{popup:['hold']}}]">Hold</a>
但是,这种方法生成的URL是一团糟。这看起来像这样:
/contact/(list//popup:hold)
应该是这样的
/contact/list(popup:hold)
由于我甚至无法访问被调用Component
的参数。
这里有什么问题?