-
Notifications
You must be signed in to change notification settings - Fork 3k
Caching state/view #2751
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Have you looked into ui-router-extras "sticky states"? If you have one or two views that you don't want to rebuild, you can use sticky states to keep them around in the DOM. You show/hide as they're inactivated/reactivated. As for your use case...
I think that could be solved by saving and restoring the scroll position as states are entered/exited. I don't know if this is something ui-router should have in core, however. |
@christopherthielen : thank you for making it a feature. BTW, I am trying sticky view one more time, and I got it. (I tried router-extra a year ago but failed to understand it). It actually make my code much cleaner, no more storing the listing in session. Thanks, you guys are so awesome |
+1 |
This issue has been automatically marked as stale because it has not had This does not mean that the issue is invalid. Valid issues Thank you for your contributions. |
Typically for most web application, user is served with a listing page (whether it is a infinite scroll, a paginated list, or something in between with "show more" button), then a item detail page. It is really unfriendly and annoying to re-scroll/ re-browse the list.
Ionic can do it, since very very long time : http://ionicframework.com/docs/api/directive/ionNavView/
I know people have raised this issue before
#1800
#63
and I also know that ui team is very busy. So I played around with ui-router source code for a while but have no idea what to do.... I also browse ionic source code which is really complex. I think I need hints and suggestions to implement the features by myself
For the moment, we desperately need to cache the listing page
The text was updated successfully, but these errors were encountered: