I need to place router components as siblings not as nested views, how I can achieve this?
Asked
Active
Viewed 65 times
0

Naveen Kumar R B
- 6,248
- 5
- 32
- 65
-
the image is unavailable – Xin Meng Feb 28 '17 at 10:28
-
The Router places components as siblings to `
`. If this is not what you want, you can implement a custom ` – Günter Zöchbauer Feb 28 '17 at 10:32` component. -
@GünterZöchbauer no, I mean to place the
as – Alexander Dudko Feb 28 '17 at 10:36not as nested -
You can use named outlets to be able to place more then one `
`, but that won't work with such simple URLs. I'd suggest you think of a different strategy. For example you can use a path like `{path: ':cmp1/:cmp2/:cmp3', component: Container }` and then in container evaluate the `route.params` and add the components to `Container` using `ViewContainerRef.createComponent` yourself. – Günter Zöchbauer Feb 28 '17 at 10:39