I have an Aurelia application where the user can select the company they're currently "working on". Every page in the app is dependent on the currently selected company, and the user can select a new company from a drop-down menu. The drop-down is a component sitting on the nav-bar.
What I'd like is to have that component reload the current page on the change.delegate
handler without restarting the app. So setting window.location.href
is out of the question.
Is there a way to force the aurelia Router
to reload the current route/page?
The alternative would be to use the EventAggregator
to signal a company change throughout the app, but that would require either subscribing to that event on every page or having every page inherit from a base class that subscribes to that event, but these are much more involved options.
/dashboard/company1
) instead of using a random number, but that didn't work... And now I realize that it's because I needed to define the route"dashboard/:company"
:/ – Nonfulfillment