Closed borm closed 9 years ago
I have find only one solution state.go('myState') change to location.href = '/myStateUrl'
Why are you using such an old version? Latest is 0.2.14. Try upgrading to that (or 0.2.13) and see if your issue is fixed.
I might be able to help, It appears the poster is referencing the docs here : https://github.com/angular-ui/ui-router/wiki/Quick-Reference#reloadonsearch-v025
I will say that there appears to be some breaking change introduced in the latest version of ui-router. When using state.go
to transition to a state you are already in, I am experiencing a bug where it will not update the params and transition anyways (such as on a search page, using params to indicate the various search params)
I will post more when I zero in on what is actually calling the break. Even passing the
{ reload: true }
options as an optional third parameter is not forcing a reload, currently.
I can confirm the bug is in 0.2.14
and not0.2.13
I will submit a separate issue for it if I can.
@the-simian does your state have reloadOnSearch=false? . Also check if the activity in #1079 affects your issue.
Please submit your new issue ASAP since we want to get 0.2.15 out right away to fix the bugs introduced in 0.2.14 that are not in 0.2.13
@christopherthielen I checked for that also, sorry I failed to mention it. I was wanting to try and repro with a plunkr. I'll go ahead and get the issue open, to catch anyone else looking for the same thing.
@bORm can you please clearly state what the problem is? I cannot tell what you are asking.
@christopherthielen
"name": "angular-ui-router", "version": "0.2.14",
I need reload page in browser after state.go('myState') complete
you want to reload the browser? Like re-fetch the JS and HTML and CSS from the server?
If so, that's not a function of UI-Router. Use standard browser functions instead: https://developer.mozilla.org/en-US/docs/Web/API/Location/reload
However, if you simply want to reload the UI-Router state (remaining in the running SPA), then use $state.go('myState', {}, { reload: true });
@christopherthielen I know that, I thought that you have a method to reload the page
Close
@christopherthielen not $state.reload()
?
@eddiemonge $state.reload()
would probably be better, yes
http://angular-ui.github.io/ui-router/site/#/api/ui.router.state.$state
reload (v0.2.5) - {boolean=false}, If true will force transition even if the state or params have not changed, aka a reload of the same state. It differs from reloadOnSearch because you'd use this when you want to force a reload when everything is the same, including search params.
Where version 0.2.5? Or how reload page after state.go()