framework: using setRoot fails to employ the router after the first call

Aurelia.setRoot('a') // a is called, its router is instantiated properly
Aurelia.setRoot('b')
Aurelia.setRoot('a') // a is called but its router-view is empty

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 37 (22 by maintainers)

Commits related to this issue

Most upvoted comments

I believe I can make this work without too much trouble. Would it be acceptable to require the following code?

this.router.deactivate();
this.router.reset();
this.aurelia.setRoot('app2');

Where this.router references the AppRouter. Let me know.