# Route page(s) accessible both through top level router and child router? \[broken link updated\]

**URL:** <https://discourse.aurelia.io/t/route-page-s-accessible-both-through-top-level-router-and-child-router-broken-link-updated/1345>\
**Category:** Help Requests\
**Created:** [June 14, 2018, 8:44pm UTC](https://discourse.aurelia.io/t/route-page-s-accessible-both-through-top-level-router-and-child-router-broken-link-updated/1345 "2018-06-14T20:44:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![deap82](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/deap82/32/203_2.png) [@deap82](https://discourse.aurelia.io/u/deap82)\
**Post date:** [June 14, 2018, 8:44pm UTC](https://discourse.aurelia.io/t/route-page-s-accessible-both-through-top-level-router-and-child-router-broken-link-updated/1345/1 "2018-06-14T20:44:51Z")

</div>

Let me begin with saying that I’m aware that this experiment might seem rather strange, but I’d very much like to understand the Aurelia child routing possibilites better and understanding the issue I’m about to present would help with that.

Have a look at this gist; [https://gist.github.com/deap82/57677ba21248598d5b784dfb5940643c](https://gist.github.com/deap82/57677ba21248598d5b784dfb5940643c)  
Load it up in [https://gist.run](https://gist.run) and open the iframe in a separate tab to see what’s going on in the address field.

The app.js defines some routes, the last one has a very generic route that only consists of parameters, which is what I would want to use, and the reason for this experiment.

The gist has three pages, don’t worry about their names, it’s just an example. You can also ignore the yellow part at the bottom.

The “Products” page has a child-router making it possible to view both the Welcome page and Contact page rendered within the child router-view. The router config is sort of the same as in app.js to enable this kind of nesting.

So I can access the Welcome page both at  
`#/Welcome`  
and  
`#/Products/Welcome`

But on the second url I actually end up at  
`#/Products/Welcome/Welcome/Welcome`

QUESTION 1: Why does Welcome become tripled in the hash?

If I try to go to  
`#/Products/Contact`  
I arrive at  
`#/Products/Contact/Welcome/Welcome`  
“Contact” could be anything in this example, but I would expect the Contact page rendered in the child router, due to that pages generic route pattern. Instead the Welcome page is shown within the child router…

I have to request  
`#/Products/Foo/Bar/Baz`  
to get the contact page rendered within the Products child router, the last three segments (Foo/Bar/Baz) can be anything with the exception that the last part can’t be “Welcome”.

QUESTION 2  
Is there any way I could make  
`#/Products/Welcome`  
show the same thing as  
`#/Products/Welcome/Welcome/Welcome`  
and at the same time access the Welcome page as is at  
`#/Welcome`  
?

---

<div class="post-metadata">

**Author:** ![lvparkington](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/lvparkington/32/736_2.png) [@lvparkington](https://discourse.aurelia.io/u/lvparkington)\
**Post date:** [June 15, 2018, 11:18am UTC](https://discourse.aurelia.io/t/route-page-s-accessible-both-through-top-level-router-and-child-router-broken-link-updated/1345/2 "2018-06-15T11:18:34Z")

</div>

This could be interesting though could not get the gist…

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/aurelia/original/1X/abbceae9033597fbdacae92a74ef5e413cb0d554.png)

---

<div class="post-metadata">

**Author:** ![deap82](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/deap82/32/203_2.png) [@deap82](https://discourse.aurelia.io/u/deap82)\
**Post date:** [June 16, 2018, 5:08am UTC](https://discourse.aurelia.io/t/route-page-s-accessible-both-through-top-level-router-and-child-router-broken-link-updated/1345/3 "2018-06-16T05:08:19Z")

</div>

Oh, sorry about that. Original post updated with link to gist and new instructions.
