I find this situation incredibly frustrating and I am desperately in need of a genuine solution. I have come up with a hack that is quite subpar, but it serves its purpose for now since I only have three outlets: a, b, and c. My current setup involves a three-panel system with auxiliary URLs and child routes. However, this makeshift "solution" would prove ineffective if I were to encounter a scenario where there are unknown numbers of named outlets or if the router outlet names could change dynamically.
How can we push Angular to address and resolve this issue?
@Component({
selector: 'my-router-outlet',
template: `
<router-outlet
*ngIf="route.outlet === 'a'"
name="a"
></router-outlet>
<router-outlet
*ngIf="route.outlet === 'b'"
name="b"
></router-outlet>
<router-outlet
*ngIf="route.outlet === 'c'"
name="c"
></router-outlet>
`,
changeDetection: ChangeDetectionStrategy.OnPush
})
export class RouterOutletComponent {
constructor(public route: ActivatedRoute) {}
}