Hello,
This is a DEMO 1 I play with that works fine in beta13
(just click on Tabs)
This is the same code with beta14
: DEMO 2: Try change Tabs. It just doesn’t work I have no clue where is my problem.
<ion-tabs class="tabs-striped tabs-top" delegate-handle="myScroll">
<ion-tab ng-repeat="tab in tabs"
delegate-handle="myScroll_{{tab.contentId}}"
title="{{tab.title}}"
badge="tab.badgeCount"
badge-style="badge-assertive"
>
<ion-content class="padding">
<h3>{{tab.title}}</h3>
<p>{{tab.title}}</p>
<p>{{tab.title}}</p>
<p>
<a class="button icon icon-right ion-chevron-right"
href="">{{tab.title}}</a>
</p>
</ion-content>
</ion-tab>
</ion-tabs>
RootCtrl:
$scope.tabs = [
{title: 'UPCOMING', meetingsMode: 'upcoming', contentId: 0, badgeCount:10},
{title: 'PENDING', meetingsMode: 'pending', contentId: 1, badgeCount:1},
{title: 'HISTORY', meetingsMode: 'frequent', contentId: 2, badgeCount:20}
];
$rootScope.selectedTab = $rootScope.selectedTab || $scope.tabs[0]; // if no history - use 0 by default
$timeout(function() {
$ionicTabsDelegate.$getByHandle('myScroll').select($rootScope.selectedTab.contentId);
}, 1000);
$scope.onTabSelected = function(tab) {
console.log('onTabSelected: ' + tab.contentId);
$rootScope.selectedTab = $scope.tabs[tab.contentId];
$ionicTabsDelegate.select(tab.contentId);
};
$scope.onControllerChanged = function(oldController, oldIndex, newController, newIndex) {
console.log('Controller changed', oldController, oldIndex, newController, newIndex);
console.log(arguments);
};
})