ionic
ionic copied to clipboard
not tab-active in firstview of default.html
When I use ng-repeat with {{tab in tabs}}
, not add class="active"
with tab.text in firstview of default.html.
But There is no problem after I flick.
app.controller("IndexCtrl", ['$rootScope', "$scope", "$stateParams", "$q", "$location", "$window", '$timeout',
function($rootScope, $scope, $stateParams, $q, $location, $window, $timeout){
$scope.tabs = [
{"text": "A"},
{"text": "B"},
{"text": "C"},
{"text": "D"},
{"text": "E"}
]
$scope.slideBox = [
{
id: 0,
title: '0something here',
view: "132"
},
{
id: 1,
title: '1text here',
view: "232"
},
{
id: 2,
title: '2something here',
view: "432"
},
{
id: 3,
title: '3text here',
view: "233"
},
{
id: 4,
title: '4something here',
view: "1da"
}
];
}
]);
<tab-slide-box tab="0" >
<div class="tsb-icons">
<div class="tsb-ic-wrp">
<a ng-repeat="tab in tabs" href="javascript:;">{{tab.text}}</a>
</div>
</div>
<ion-slide-box show-pager="false" on-slide-changed="slideHasChanged($index)">
<ion-slide ng-repeat="slide in slideBox">
<h3>{{slide.title}}</h3>
</ion-slide>
</ion-slide-box>
</tab-slide-box>
I have the same problem... +1