ionic 隐藏ion-tabs底部导航 hide-tabs
2015-11-23 09:49
519 查看
ionic 隐藏导航,网上以有大神解决了。但好像都是二级页面的。到了三级就不行了。有的是返回就不行了。
ion-tabs导航
hideTabs的directive js 注意app=angular.module(‘directive’, [])
内页需要隐藏导航 hide-tabs=”true”
这样三级导航和返回都没有问题了哦。。
ion-tabs导航
<ion-tabs class="tabs-icon-top tabs-color-active-positive {{$root.hideTabs}}"> </ion-tabs>
hideTabs的directive js 注意app=angular.module(‘directive’, [])
app.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; }) }); } }; })
内页需要隐藏导航 hide-tabs=”true”
<ion-view hide-tabs="true" view-title="{{investname}}"> </ion-view>
这样三级导航和返回都没有问题了哦。。
相关文章推荐
- php解决问题的方法
- 基于busybox-1.23.2(stable)版本制作arm-linux使用根文件系统
- 面试请假攻略,不用裸辞也能找到工作
- 去除inline-block元素间间距
- opencv for java HoughLinesP的使用
- Android AutoLayout全新的适配方式 堪称适配终结者
- 27.c/c++程序员面试宝典-复制构造函数
- 【自学考试】超键、候选键、主键
- 建议PM注意任务的延时分发
- 笔记整理1_1:解决在ScrollView中嵌套ListView不能显示全部item的问题
- 一个经典的PHP文件上传类
- MySQL中InnoDB存储引擎的锁的基本使用教程
- C++中的全局namespace
- _weak typeof(self) weakSelf = self;
- javascript实现uploadify上传格式以及个数限制
- 华为OJ基础篇-输入n个整数,输出其中最小的k个
- Jquery 效果使用详解
- 关于Win7 64位下:Navicat无法连接64位Oracle 11gR2:Cannot load OCI DLL解决方法
- 使用Mybatis-Generator自动生成Dao、Model、Mapping相关文件(转)
- Apache Shiro 关于Shiro 授权