I have the following template for the root component of my angular2 app:
<main class="main">
<div class="main__container">
<div class="main__left-area">
<router-outlet name="left-zone"></router-outlet>
</div>
<div class="main__right-area">
<router-outlet name="right-zone"></router-outlet>
</div>
</div>
</main>
And the following routes:
import { HomeSummaryComponent } from "../components/home-summary/home-summary.component"
import { DataSummaryComponent } from "../components/data-summary/data-summary.component"
import { AskSummaryComponent } from "../components/ask-summary/ask-summary.component"
import { Routes } from "@angular/router"
export const AppRoutes: Routes = [
{
path: "",
component: HomeSummaryComponent,
outlet: "left-zone"
},
{
path: "",
component: DataSummaryComponent,
outlet: "right-zone"
}
];
It actually works pretty well, but I'd like to be able to load more than a single component in the "right-zone" (and in the left one as well actually). The idea would be to have something like this:
{
path: "",
components: [ DataSummaryComponent, AskSummaryComponent ],
outlet: "right-zone"
}
The controllers would just be appended one after one. Is it currently supported? If no, is it possible to extend the existing RouterOutlet to do so?
Thanks