(Please forgive me if this is a duplicate; I searched for topics covering this and didn’t see anything.)
One use case for our app is within an iframe. Under certain circumstances, the src for the frame is set to the same url it’s already at. Trying another mechanism, using iframe.contentWindow.location.assign(theSameHrefAsItAlreadyHas) has the same surprising behavior, and that is this: Aurelia’s router navigates to the same url it’s already on. The
existing view model’s destroyed and the new one constructed leaving us at the same point from which we came.
What I’m wondering is this:
- Is there a way to configure the router such that it will not perform an action when all of the parameters end up the same as the model it’s already on?
- If there isn’t a stock/default mechanism for this, what’s the right/best way?
- Are there any obvious downsides/consequences to behaving as we’re hoping, which I’m just not foreseeing?
We’ve only just begun looking into this, but were considering adding an authorize step with a next.cancel when we see route parameters not changing. Is that advisable?