Ich verwende Ionic1 und benötige Hilfe, um herauszufinden, wie der aktive Standard-Tab-Mechanismus funktioniert. Momentan gibt es 3 Registerkarten und die standardmäßig aktive Registerkarte ist die richtige. Ich möchte, dass es die linke ist.Standard-Registerkarte "Aktiv" in Ionic
Ich folgte diesem Beispiel - Ionic : Select Tab - CodePen - und die standardmäßig aktive Registerkarte hier ist die linke (was ist, was ich will), so verstehe ich nicht, warum in meiner App der Standard ist die richtige Registerkarte und in dem Beispiel ist die linke Registerkarte.
Kann jemand etwas Licht auf das Thema werfen?
My-Code
article.route.js:
.state('app.article', {
abstract: true,
templateUrl: 'app/article/articleTabs.html',
})
.state('app.article.details', {
url: '/home/:articleID',
views: {
'first-tab': {
templateUrl: 'app/article/article.html',
controller: 'ArticleController',
controllerAs: 'vm',
},
'second-tab': {
templateUrl: 'app/article/article.html',
controller: 'ArticleController',
controllerAs: 'vm',
},
'third-tab': {
templateUrl: 'app/article/article.html',
controller: 'ArticleController',
controllerAs: 'vm',
}
}
});
articleTabs.html:
<ion-tabs>
<ion-tab title="First" ui-sref="app.article.details">
<ion-nav-view name="first-tab"></ion-nav-view>
</ion-tab>
<ion-tab title="Second" ui-sref="app.article.details">
<ion-nav-view name="second-tab"></ion-nav-view>
</ion-tab>
<ion-tab title="Third" ui-sref="app.article.details">
<ion-nav-view name="third-tab"></ion-nav-view>
</ion-tab>
</ion-tabs>
article.html:
<ion-view>
<ion-nav-buttons side="secondary">
<button class="button button-large ion-ios-location" ng-click="vm.doSomething()">
</button>
</ion-nav-buttons>
<ion-content has-bouncing="false" overflow-scroll="true">
...........
</div>
</ion-content>
</ion-view>
Dank.
ja, das funktioniert gut im Codepen Beispiel. Aber in meiner App beginnt es mit dem dritten Tab als Standard. Ich versuche zu verstehen, was die Bestellung steuert. Ich kann nicht das gleiche Verhalten wie im Codepenbeispiel haben. – badigard