bug: Page do not reload
Type: bug
Platform: ios 8 webview
Beta 14 At the moment I'm testing it on iOS simulator
When I first load states main.first and main.second all works fine.
If I go back only the nav-bar reloads his content. The ion-content remain last one loaded.
Here some of my code:
app.js
.state('main', {
url: "/main",
abstract: true,
templateUrl: "templates/main.html",
controller: 'MainCtrl'
})
.state('main.first', {
url: "/first",
views: {
'main-first': {
templateUrl: "templates/main-first.html",
controller: 'MainFirstCtrl'
}
}
})
.state('main.second', {
url: "/second",
views: {
'main-second': {
templateUrl: "templates/main-second.html",
controller: 'MainSecondCtrl'
}
}
})
...
main.html:
<ion-view>
<ion-nav-view name="main-first"></ion-nav-view>
<ion-nav-view name="main-second"></ion-nav-view>
</ion-view>
```</span>
<span is-issue-template></span>
Sounds like the view is getting cached. This is a new feature in beta-14. It can be disabled with $ionicConfigProvider, eg: views.maxCache(0). Does this help?
Thanks @drewrygh for your reply. I already tried to use cache-view="false" and also using cache: false, in the state declaration but it didn't worked.
At the moment I changed the structure removing the main abstract state to fix this issue and go on on the dev of my app so I'm not able to test your solution.
So at the moment I fixed my issue with a workaround.
@gio82 Any chance you could put together a codepen?
Here for you guys: http://codepen.io/anon/pen/gbLPoP
BTW: Happy new year!! :)
The issue is with how the abstract view is set up. You should only have one ion-nav-view in there.
http://codepen.io/mhartington/pen/ZYKypw
You could even go as far as remove the abstract state. http://codepen.io/mhartington/pen/mymwOW
Closing this.
Oh, ok! Thanks for your help and sorry.