If I call:
" this._router.reset(); " it seems working but at the first time of the root’s change I have to press the button 2 times… in the others times it works always at the first click.
The first thing you should always do when looking for help is to create a reproduction using gist.run, etc. I did this for you: GistRun
As you can see from the example above, I am able to switch back and forth between roots A and B and routes One and Two without issue. That tells me that the issue might be in your code specifically.
In the example above, when you switch from A to B, you’re either at #/one or #/two, which are both configured on both roots A and B. Chances are you are switching from root A route #/two to root B where route #/two is not configured.
Try adding config.mapUnknownRoutes('one') to your configureRouter() function, to whichever route is your “home” route in that root.
If that doesn’t work, I recommend that you (a) modify the gist.run above to demonstrate what the issue is and / or (b) reach out to Aurelia support, who will get on a call with you and work with you to solve your particular issue quickly.
But I have to say that I already changed the configuration of treeviews …
Now I have only one “big” (about 12-15 views to route) route where I do routing.
For the moment I’m ok.