I have an ionic/angularjs/ui-router app that has a couple of intro/onboarding screens that leads into a home page with an accordion list of items. If I expand (for example) item 7 in the list(on the home page) and click on a sub item in the list, it will navigate me to a details page. When I return back to the home page, the list is not expanded anymore. Someone mentioned that there was an add-on called ui-router-extras that could save the state of the UI when navigating back. I've added it to code but I'm having trouble applying it to my app seeing as the examples for ui-router-extras have to do with apps using tabs.
I would like the result to be where the accordion list is still expanded when I navigate back to the home view/page (home.list).
My states look like the following
.state('welcome', {
url: '/welcome',
templateUrl: 'welcome.html',
controller: 'welcomeCtrl'
})
.state('home', {
abstract: true,
url: '/home',
templateUrl:'homeParent.html'
})
.state('home.list', {
url:'/list' ,
views: {
'list@home': {
templateUrl: 'list.html',
controller: 'listCtrl',
}
},
deepStateRedirect: true,
sticky: true
})
.state('detail', {
url: '/detail',
templateUrl: 'detail.html',
controller: 'detailCtrl',
});
Here's my code pen http://codepen.io/markace1246/pen/BpzIv
I'm not sure what I'm doing wrong.