christopherthielen / ui-router-extras

THIS PROJECT IS NO LONGER MAINTAINED -- Extras for UI-Router for AngularJS. Sticky States (a.k.a. parallel states), Deep State Redirect (for tab-like navigation), Future States (async state definition)
http://christopherthielen.github.io/ui-router-extras/
MIT License
917 stars 211 forks source link

State change with "notify: false" refreshes sticky on next transition #369

Open otterslide opened 7 years ago

otterslide commented 7 years ago

I have this line in my code: $state.go('Home.edit', {id: response.id}, {notify: false}); Which I use just to change the URL in case the user goes to the wrong ID.

So if I go to /edit/222 and id 222 doesn't exist, it changes to /edit/ for example, without reloading the entire page. But having this seems to break the sticky:true. I have it working fine if this never happens. When the state change with Notify:false happens, it will refresh the state when I switch to a new state.. so instead of staying "sticky" and unchanged, it actually refreshes.

Any ideas how I can change the URL inside a sticky state, without causing a refresh on the next state change? If I don't use notify:false then the state will refresh, which I don't want. I just want to keep URL correct so if they press Refresh it will work correctly.