I am working on an app that I am building from the ionic framework.
I have a three tabbed view.
- list
- filter
- tab3
The scenario is for the first time when I go to list state from filter state and then I select one item from the list and go the list detail page and I click on the back button from detail, this time I go back to list page but the list reloads means the state reloads.
But If I do this for the second time the list doesn’t reload and the state cache has been saved properly.
It only happens for the first time. I don’t know what could be the reason can anyone help me with this?
.state('app', {
url: '/app',
abstract: true,
templateUrl: 'menu.html',
controller: 'AppCtrl'
})
.state('app.parentTab', {
url: '/parent',
cache: true,
views: {
'menuContent': {
templateUrl: 'parent.html',
controller: 'parentCtrl'
}
}
})
.state('app.parentTab.list', {
url: '/list',
cache: true,
views: {
'search-units': {
templateUrl: "list.html",
controller: 'listCtrl'
}
},
})
.state('app.parentTab.listFilter', {
url: '/listFilter',
authRequired: false,
cache: true,
views: {
'search-filter': {
templateUrl: "filter.html",
controller: 'filterCtrl'
}
},
})
.state('app.parentTab.tab3', {
url: '/tab3',
cache: false,
views: {
'search-map': {
templateUrl: "tab3.html",
controller: 'tab3Ctrl'
}
},
})
.state('app.detail', {
url: '/detail',
cache: false,
views: {
'menuContent': {
templateUrl: "details.html",
controller: 'detailsCtrl'
}
},
})