Hi all,
I have an issue with the tab functionnality.
When I select the last tab and then another one, I always see the view of the last tab!
Here is a part of my code :
.config(function($stateProvider, $urlRouterProvider) {
$stateProvider
.state('tabs', {
url: "/tab",
abstract: true,
templateUrl: "templates/tabs.html"
})
.state('tabs.home', {
url: "/home",
views: {
'home-tab': {
templateUrl: "home.html",
controller: 'HomeCtrl'
}
}
})
.state('tabs.map', {
url: "/map",
views: {
'map-tab': {
templateUrl: "map.html"
}
}
})
.state('tabs.live', {
url: "/live",
views: {
'live-tab': {
templateUrl: "live.html"
}
}
})
my template :
<script id="templates/tabs.html" type="text/ng-template">
<ion-tabs class="tabs-striped tabs-icon-top tabs-top tabs-background-calm tabs-color-light">
<ion-tab title="Home" icon="ion-ios7-home-outline" ui-sref="tabs.home">
<ion-nav-view name="home-tab"></ion-nav-view>
</ion-tab>
<ion-tab title="Trafic en direct" icon="ion-ios7-bolt-outline" ui-sref="tabs.live">
<ion-nav-view name="live-tab"></ion-nav-view>
</ion-tab>
<ion-tab title="Alerte" icon="ion-ios7-plus-outline" ui-sref="tabs.contact">
<ion-nav-view name="alert-tab"></ion-nav-view>
</ion-tab>
<ion-tab title="Carte" icon="ion-map" ui-sref="tabs.map">
<ion-nav-view name="map-tab"></ion-nav-view>
</ion-tab>
</ion-tabs>
</script>
One of the view :
<script id="live.html" type="text/ng-template">
<ion-view view-title="Live">
<ion-content class="padding positive-bg has-tabs-top">
<p class="dark ">test</p>
</ion-content>
</ion-view>
</script>
I can’t see what is wrong.
Any idea?
Thanks in advance for your help!