rpocklin / ui-router-tabs

Idiot-proof tab panes with route support using Angular.js + Bootstrap 3 + UI Router
Other
244 stars 57 forks source link

How to prevent reloading after changing the tab #77

Closed zhanghuanchong closed 8 years ago

zhanghuanchong commented 8 years ago

The tab will reload after changing to other tab and come back. How to prevent this?

rpocklin commented 8 years ago

What do you expect to happen? Nothing is storing transient state anywhere, UI Router doesn't work like this (out of the box). If you want to save state between routes i'd recommend the ui-router-extras package or use local storage to cache / restore transient view state. This library isn't doing anything special WRT to this.

zhanghuanchong commented 8 years ago

Thank you. I have managed to prevent reloading with ui-router-extras. 👍

"Sticky State" and "Deep State Redirect" work for me. 😆