Problem:
In very rare case it happens once that while user click on ion-tab it redirect to wrong URL.
- User press dashboard tab should go to /dashboard
- But in this random case, it go to /page instead
After restart the app, this issue didn’t happens again.
Example:
html
<ion-tabs delegate-handle="my-handle" class="tabs-icon-top" >
<ion-tab title="Dashboard" icon-off="ion-ios-home-outline" icon-on="ion-ios-home-outline" href="#/tab/dashboard">
<ion-nav-view name="tab-dashboard"></ion-nav-view>
</ion-tab>
...
</ion-tabs>
JS
.state('page', {
url: '/page',
templateUrl: 'templates/page.html',
controller: 'PageCtrl',
params: {
param: null
}
})
.state('tab', {
url: '/tab',
abstract: true,
templateUrl: 'templates/tabs.html'
})
// Each tab has its own nav history stack:
.state('tab.dashboard', {
url: '/dashboard',
views: {
'tab-dashboard': {
templateUrl: 'templates/tab-dashboard.html',
controller: 'DashboardCtrl'
}
}
})
Suspect:
I did using some independent page ‘/page’ without ion-tab.
User can access those page from the tab.
Will it cause this problem?
This was my first Ionic project and found this problem once during testing phase.
Really cannot figure what is the problem.
I believe the tabs url is hardcoded and should not happens with this issue.
Really appreciate if anyone got idea for this issue.
Thanks.