0

I made a simple test to practice the RouteConfig feature and I don't know how to go back to the main component from the children component. My plunker is:

plnkr.co/edit/25DCfUADQZJb2XMjb0hW?p=preview

Thanks in advance!

Thierry Henry
  • 33
  • 1
  • 7
  • I had a problem with the Plunker. Chrome Aw, snap!ed every time I changed something. One issue is that the initial page is somewhat invalid. There is no default route selected. (`useAsDefault: true)` I wonder why this didn't produce an error. I think you should split the `/` route and the `/...` route and make one the default. Then navigating to any route should work. When you navigate to a root route use `/RouteName` instead of just `RouteName`. – Günter Zöchbauer May 25 '16 at 10:25
  • I made several changes based on your answer and the component didn't load. Finally, I left it unchanged. – Thierry Henry May 25 '16 at 17:01

1 Answers1

0

I think it may help you. Just try it.

this._location.back();
Ived
  • 111
  • 1
  • 1
  • 11
  • I changed that part in the function located inside the children component and the test has a strange behaviour. http://plnkr.co/edit/25DCfUADQZJb2XMjb0hW?p=preview – Thierry Henry May 25 '16 at 16:52