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

Remember scrolled position with sticky #271

Open philecom opened 8 years ago

philecom commented 8 years ago

First of all I will like to thank you for such a wonderful add-on. I am however facing this issue I believe you can help me resolve. I have two states: 1) itemlist and 2) itemdetail. The itemlist states shows list of items which is loaded through loadmore. when a use taps on an item it takes them to the itemdetail. The issues is that when a user use the back button from the itemdetail page(state) it takes them back to the last scrolled position on the itemlist page (state) which is what I am expecting. However, when they tap directly on the itemlist button, it takes them back to the page, but this time the page is scrolled to the top instead of last scrolled state.

NOTE// I can confirm the sticky is working cos the dom/controller does not reload.

I will be glad if you can help resolve this, thank you.

christopherthielen commented 8 years ago

I'll need a plunker to replicate the issue, in order to help diagnose this problem.

Can you enable debug tracing? $stickyStateProvider.enableDebug(true);