0

I need to place router components as siblings not as nested views, how I can achieve this?

enter image description here

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 `` component. – Günter Zöchbauer Feb 28 '17 at 10:32
  • @GünterZöchbauer no, I mean to place the as not as nested – Alexander Dudko Feb 28 '17 at 10:36
  • 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

0 Answers0