You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've noticed that when transitioning to a new route the URL will lazily update (ie. not until the route is completely done transitioning). This can create issues with slow or failed transitions as refreshing the page will put you back into the old route.
I did some digging and found that ember has switched between eager and lazy over time.
I do like the idea of the route rendering being eager or lazy based on whether a loading route is provided or not; is there anyway this can be extended to URL updating? Basically, it would be nice if there were some way to configure whether a transition will update the URL eagerly or lazily.
I am currently forcing eager updates by replicating a bit of code from when transitions did update the url eagerly:
vartransition=this.transitionToRoute('newRoute',{queryParams: queryParams});varnewUrl=transition.router.generate('newRoute',{queryParams: transition.queryParams});if(transition.urlMethod==='update'){transition.router.updateURL(newUrl);}elseif(transition.urlMethod==='replace'){transition.router.replaceURL(newUrl);}transition.method(null);// Prevent later update url refire.
The text was updated successfully, but these errors were encountered:
I've noticed that when transitioning to a new route the URL will lazily update (ie. not until the route is completely done transitioning). This can create issues with slow or failed transitions as refreshing the page will put you back into the old route.
I did some digging and found that ember has switched between eager and lazy over time.
I also noticed that the docs are currently out-of-date:
"URLs always update immediately unless the transition was aborted or redirected within the same run loop."
http://guides.emberjs.com/v1.11.0/routing/loading-and-error-substates/
I do like the idea of the route rendering being eager or lazy based on whether a loading route is provided or not; is there anyway this can be extended to URL updating? Basically, it would be nice if there were some way to configure whether a transition will update the URL eagerly or lazily.
I am currently forcing eager updates by replicating a bit of code from when transitions did update the url eagerly:
The text was updated successfully, but these errors were encountered: