Good day everyone!
I have a such application route structure:
.state('app', {
url: "/app",
abstract: true,
templateUrl: "js/app.html"
})
.state('login', {
url: "/login",
cache: false,
templateUrl: "js/login/login.html"
})
.state('app.tasks', {
url: "/tasks",
abstract: true,
cache: true,
views: {
'mainContent': {
templateUrl: "js/tasks/tasks.html"
}
}
})
.state('app.tasks.list', {
url: "/list",
cache: true,
views: {
'tasksListTab': {
templateUrl: "js/tasks/tasks_list.html"
}
}
})
As u can see i have 2 abstract bases: login and app. The problem occurs with ionic cache…
- So, when user logs in my app, he gets app.tasks.list page.
- Ionic caches it.
- User presses logout button.
- User is redirected to login page, where $ionicHistory.clearHistory(); and $ionicHistory.clearCache(); executes.
- User logs in one more time with other login/pass and get cached app.tasks.list page.
Any ideas why he gets cached page and what to do? The most interesting is that cache is not dropped only for page from where user logged out.
Thanks in advance!!