HTML code <div class= "Row" > <div class= "tabs gem-position-static profile-tabs" ng-repeat= "Item in Initslidetabs.data" > <a class= "Tab-item" href= "#" ng-click= "Activeslide ($index)" ng-bind= "Item.name" > </a> </div> </div> <ion-slide-box On-slide-changed= "slidechanged (Index)" active-slide= "SlideIndex" does-continue= "{{ Initslidetabs.doescontinue}} "show-pager=" {{Initslidetabs.showpager}} "> <ion-slide ng-repeat=" item in Initslidetabs.data "> <div ng-include=" item.tpl "class=" padding "></div> </ion-slide > </ion-slide-box>
/* Personal homepage */controller.js. Controller (' Personhomectrl ', function ($scope, $ionicSlideBoxDelegate) {//Initialize Slidetabs number According to $scope. Initslidetabs = {data:[{name: "Home", TPL: ' templates/person/person-home-page.html ' }, {name: ' Course ', TPL: ' templates/person/person-course.html '}, {name: ' article ', TPL: ' templates/person/a D.html '}, {name: ' Job ', TPL: ' templates/person/ad.html '}],//tab content doescontinue:false,// Whether the loop toggles whether showpager:false//shows the time interval of the small black Point//slideinterval:4000//auto-switch}; The first $scope is selected by default. SlideIndex = 0; Slide the slider below to respond to the above tabs switch $scope. slidechanged = function (index) {$scope. SlideIndex = index; }; Click on the tabs toggle above to slide $scope in response to the slider below. Activeslide = function (index) {$ionicSlideBoxDelegate. Slide (index); }; })
Source:
http://download.csdn.net/detail/qinguicheng/9512076
Ionic customizing TEB switching