Is there any way with angular-ui-router to actually preserve the state of the UI like most native apps do?
For example, if I was on the home view and I clicked an accordion list which expanded, then clicked on that item inside the list and navigated to another view. Next, I decide to go back to the home view. The result I would like to have is the accordion list still expanded when navigating back to the home view.
Is there any way to preserve the actions/state of UI we navigating back and forth between views instead of a complete refresh of the view?
I wonder if this would reduce the rendering of the previous state? If so, it would be very nice. I could not deduce whether this would work sort of like cached state and render it much quicker than how it works currently.
Patrick, could you please share a link to a working example or sth that could help understand this or see in action? I’m fighting with this without success as described here Prevent controller from reloading/rebuilding on state change and I’m ready to give up
I believe I attempted nested states in this code pen below,(correct me if I didn’t do it right), but I still can not get the accordion to stay expanded when return the previous state/view. Plus, the controller is reloading on return to state.
@markace1246: I agree that this, together with @rafaellop’s question, seems like an essential problem and I’d love to hear if you guys had any luck figuring it out? I’m bumping my head against the same thing…Thanks!