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

back button on browser #309

Closed jmls closed 8 years ago

jmls commented 8 years ago

I have this plunk: http://plnkr.co/edit/kxZXlXIAmf5K5nMwCATt?p=preview

What happens is you press the start button, and you go to the account, press the "survey" button and you go to survey

but if you press the back button in the browser, you now go back to the original , not the account

how can I make the browser back button go to the previous state ?

christopherthielen commented 8 years ago

That's surprising behavior. I'm not sure how this happens! I suspect it has to do with the two slashes in the path. I also suspect this is an angular bug.

Two things: 1) This definitely isn't an Extras bug. The same thing happens when ui-router-extras is not included: http://plnkr.co/edit/sisuQGxnUSrZnEFMxcWu?p=preview 2) If you remove the double slash (change tabs to url: '') in the path, it works fine.