码迷,mamicode.com
首页 > 其他好文 > 详细

[转]ionic tab view hide tab bar

时间:2016-02-24 12:24:38      阅读:181      评论:0      收藏:0      [点我收藏+]

标签:

http://stackoverflow.com/questions/23991852/how-do-i-hide-the-tabs-in-ionic-framework

////// tabs.html
<ion-tabs ng-class="{‘tabs-item-hide‘: hideTabs}">
    // --> your tabs here
</ion-tabs>

////// somewhere_you_wanna_hide_tabbar.html
<ion-view hide-tabs>
  // --> your contents
</ion-view>

////// directives.js
.directive(‘hideTabs‘, function($rootScope) {
    return {
        restrict: ‘A‘,
        link: function($scope, $el) {
            $rootScope.hideTabs = true;
            $scope.$on(‘$destroy‘, function() {
                $rootScope.hideTabs = false;
            });
        }
    };
});

I hope this helps you guys :)

[转]ionic tab view hide tab bar

标签:

原文地址:http://www.cnblogs.com/freeliver54/p/5212382.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!