How to access child router in Aurelia?

前端 未结 2 512
再見小時候
再見小時候 2021-02-06 18:25

I have two child routers. I can navigate from one to other. But from the child router view, how can I navigate?

Below line of code gives the parent router instance.

2条回答
  •  情歌与酒
    2021-02-06 18:54

    My friend helped me solve this. For the child router on first router navigation I had blank '' and it took the URL with like localhost:9000/. When I try to navigate from there I had problem. So from the first navigation, I changed to the code to route like childrouter/name and it worked.

提交回复
热议问题