1.tabs页面
<ion-tabs class="tabs-icon-top tabs-positie {{hideTabs}}>
...
</ion-tabs>
2.跳转后页面
<ion-view hide-tabs>
..
</ion-view>
3. 指令
.directive('hideTabs',function($rootScope){
return {
restrict:'AE',
link:function($scope){
$rootScope.hideTabs = 'tabs-item-hide';
$scope.$on('$destroy',function(){
$rootScope.hideTabs = ' ';
})
}
}
}
本文将介绍如何在Angular应用中实现Tab切换功能,并通过指令和视图元素控制Tab显示状态。
2287

被折叠的 条评论
为什么被折叠?



