Child Router Navigation: Route not found: #230
Comments
@bryanrsmith , @EisenbergEffect Help please! |
URL generation doesn't properly handle arrays of patterns. Try splitting out the default route pattern '' into a separate route from 'contract-view' so that the named route has only one pattern. There is an issue open for this in the router repo. Sorry for the delayed response. I don't get notifications on this repo. |
@bryanrsmith you mean like this, in home.ts?
This doesn't seem to help my case. |
To clarify, when I changed to the above and by doing,
It works the first time when I click on a item in the list, but for all next item selections, it throws the same "Route not found home/contract-view/4094", because, as I understand, it is trying to navigate relative to the already existing path of home/contract-view/4090 instead of replacing it. |
I may have misunderstood you. It sounds like you might be running into this issue: aurelia/router#27. Is that right? |
Looks like that's the one. Any solution/workaround? |
I think the only workaround is using a redirect from |
Closing as a duplicate to aurelia/router#27. |
I am getting error with Router. please help.
|
You don't have any routes that map to |
Below are my views:
app
- standardhome
- Has a list of items on left, on selection of any, will display some content on the right side in router-view (contract-view to be loaded).contract-view
app.ts: route Config:
Home.ts Router Config:
on selection of a item in home page list, I am trying to navigate as below, in home.ts:
However it throws the error: Route not found: /contract-view/4090
At this point, it's still home page and default route, hence the url reads: http://localhost:9000/#/
and so it fails.
But, if I manually change the url to http://localhost:9000/#/home and then select a list item, navigation to contract-view works.
What I am I missing here?
I am looking for absolute path navigation. Tried navigating to 'home/contract-view' but fails with error:
A route with name 'home/contract-view' could not be found. Check that
name: 'home/contract-view'
was specified in the route's config.The text was updated successfully, but these errors were encountered: