Index does not refresh


#1

Hi All,
I have an issue with index page not refreshing. This is my route definition:
routes: [
{
name: ‘index’,
path: ‘/’,
pageName: ‘index’,
on: {
pageBeforeIn: function(e, page) {
Dashboard.refresh();
}
}
},
{
name: ‘profile’,
path: ‘/profile/’,
url: ‘./pages/profile.html’,
on: {
pageBeforeIn: function(e, page) {
Profile.getProfile();
}
}
},
{
name: ‘settings’,
path: ‘/settings/’,
url: ‘./pages/settings.html’,
on: {
pageBeforeIn: function(e, page) {
Settings.getProfile();
}
}
},
]

When i open the app for the first time my Dashboard.refresh(); is fired, all content loaded, and stored in localStorage, however when i start switching between pages /settings, /profile several times, my index data from storage is gone, icons do not have counters, etc.
So i thought i will refresh index each time but it seems to work only in the phonegap browser, as soon as i put page on android/ios i can immediately see index’s Dashboard.refresh(); is not being called at all. tried adding data-force=“true” to back buttons but no luck.


#2

can you put an alert before Dashboard.refresh();? alert(‘before call dashboard’).
Where is dashborad defined?