When the view cache is enabled, my view will freeze randomly, it could be relates to my current routing setup, because I am using tab views, and with each tab, I have shared sub routes, so the same view/controller can be access in different tabs. I had to duplicate my routes for each tab (Not sure if this is the right way). I think this is the problem when I enable the cache, when I access the same page using different tab routes one after another, the page will freeze. I tried to eliminate other cause, but when I disabled the cache by
$ionicConfigProvider.views.maxCache(0);
it start to work properly.
Here is an example of my duplicate routing setup
.state('main.tab1-form', {
url: '/tab1/form',
views: {
'tab2': {
templateUrl: 'templates/form.html',
controller: 'Ctrl'
}
}
})
.state('main.tab2-form', {
url: '/tab2/form',
views: {
'tab2': {
templateUrl: 'templates/form.html',
controller: 'Ctrl'
}
}
})