How can I update URL always, regardless of resolved or rejected promise from model?


For rejected promise, the error template which was rendered in outlet of application template had showed something about wrong url.

But the current url still displays previous url.

So in current state, the url doesn’t match its content.

window.location.pushState() is a way, but is there a ember way to do this?


I’ve done something like this in the past:,js,output

I don’t recall the full solution, but threw this together for you. You’ll need to amend it to handle query params also, I didn’t include that. There are likely some corner cases here… but hopefully gets you pointed in a direction. I do know I had a good solution around building up the segments, but can’t remember what I did. I’ll come back and update if I remember.