在Angular 11中,如果无法路由到命名出口,可以尝试以下解决方法:
const routes: Routes = [
{ path: 'somePath', component: SomeComponent, outlet: 'namedOutlet' }
];
Go to named outlet
const routes: Routes = [
{ path: '', redirectTo: '/(namedOutlet:somePath)', pathMatch: 'full' }
];
上述解决方法可以帮助您解决Angular 11中无法路由到命名出口的问题。请根据您的具体情况选择合适的解决方法。