angular.js - ionic三级目录乃至多级目录如何隐藏tabs?
过去多啦不再A梦
过去多啦不再A梦 2017-05-15 16:57:31
0
1
595
.directive('hideTabs', function($rootScope) {
    return {
        restrict: 'A',
        link: function(scope, element, attributes) {

            scope.$on('$ionicView.beforeEnter', function() {

                scope.$watch(attributes.hideTabs, function(value){
                    $rootScope.hideTabs = 'tabs-item-hide';
                });

            });

            scope.$on('$ionicView.beforeLeave', function() {
                scope.$watch(attributes.hideTabs, function(value){
                    $rootScope.hideTabs = 'tabs-item-hide';
                });
                scope.$watch('$destroy',function(){
                    $rootScope.hideTabs = false;
                })

            });
        }
    };
})

目前是通过这个指令实现耳机目录的隐藏

过去多啦不再A梦
过去多啦不再A梦

reply all(1)
左手右手慢动作

http://www.ithao123.cn/content-7470620.html

This is more powerful, there is no need to monitor the beforeEnter and beforeLeave events of each page

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!