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
915 stars 211 forks source link

Deep State Redirect doesn't respect location:false #342

Open tinyfly opened 8 years ago

tinyfly commented 8 years ago

I have location: false set on a lot of my routes through ui-sref-opts or as on option on $state.go(). No matter what I try it the url does indeed change when the redirect is done. Even if I went to that deep state with no url change to begin with. Am I doing something wrong or is this by design?

christopherthielen commented 8 years ago

It's not by design. Before ui-router 0.2.16 or so, the options was not available in the $stateChangeStart event, so it wasn't even possible. However, it's certainly possible now.

I'd love a PR to address this. The relevant code is mostly here: https://github.com/christopherthielen/ui-router-extras/blob/1a3d7c01e62144fc0985a0a92c52f93ab270ff82/src/dsr.js#L105-L122