Hi Sander,
sorry for the late reply. I've assembled this plunkr:
http://plnkr.co/edit/6aV5n5K5wdqdiYo49lZv. It's the first time I use plunkr so I apologize if something's wrong (to me it's extremely slow... but it works).
So, with regard to the plunkr: what I am currently able to do is load components dynamically and add them to the application (see tab "Dynamic Modules").
What I've also done is to use multiple named router-outlets, despite not finding any official documentation (see tab "Dynamic Routed"). Despite the tab name, routes are known ahead of time.
What I want to do is: dynamically load a configuration (the dynamicRoutes array in the DynamicRoutesComponent) and only after create one router-outlet per dynamic route and use resetConfig (or what it takes) to have this configuration:
{
path: "dynamic-routed",
component: DynamicRoutesComponent,
children: [
{ path: "", component: EmptyComponent },
{ path: "component1", component: Component1, outlet: "component1" },
{ path: "component2", component: Component2, outlet: "component2" }
]
}
with one child per dynamic route.
Thanks in advance!