$ionicPlatform.registerBackButtonAction用法
来源:互联网 发布:winxp添加网络打印机 编辑:程序博客网 时间:2024/05/18 01:50
var deregister = $ionicPlatform.registerBackButtonAction( function () { console.log("close the popup") }, 100 ); //Then when this scope is destroyed, remove the function $scope.$on('$destroy', deregister)ionic 通过这个控制安卓物理返回键返回键优先级定义,主要用途是返回键行为的优先级定义,例如当有弹出框时(优先级400),按返回键取消弹出框,不回退页面(优先级100)
所以401会比101更优先执行 而且执行401后不会再执行101所以当我们在controller里对popup的返回进行单独处理后一定要把
- var PLATFORM_BACK_BUTTON_PRIORITY_VIEW = 100;
- var PLATFORM_BACK_BUTTON_PRIORITY_SIDE_MENU = 150;
- var PLATFORM_BACK_BUTTON_PRIORITY_MODAL = 200;
- var PLATFORM_BACK_BUTTON_PRIORITY_ACTION_SHEET = 300;
- var PLATFORM_BACK_BUTTON_PRIORITY_POPUP = 400;
- var PLATFORM_BACK_BUTTON_PRIORITY_LOADING = 500;
registerBackButtonAction给remove掉
$ionicPlatform.registerBackButtonAction方法调用后会返回一个函数,当这个函数被再次调用时 这个注册事件就会被销毁了。
0 0
- $ionicPlatform.registerBackButtonAction用法
- ionic中的$ionicPlatform.ready事件中的通用设置
- 用法
- ,, 用法
- 用法
- 用法
- #用法
- ??用法
- !!用法
- CustDialog用法 SimpleAdapter 用法
- hibernate_Restrictions用法 hibernate_Restrictions用法
- extern用法+assert用法
- getParameterValues用法
- rpm用法
- Log4j用法
- NameSpace用法
- sp_executesql 用法
- ShellExecute用法
- VS2015+OPENCV3.1.0配置/VS卡顿解决办法
- python 字典、列表和json对象互转
- The Automation Testing System 2: System Testing
- 响应式开发从原理到实战案例(三):静态页面转响应式页面
- python中继承一个类
- $ionicPlatform.registerBackButtonAction用法
- hdu 2444 The Accomodation of Students (二分图判定+匈牙利算法)
- eclipse转androidstudio(二)eclipse设置,更好的开发体验
- Metropolis 采样与蒙特卡洛算法
- ubuntu16.04 启动就进入命令行模式
- 1T移动硬盘NTFS格式化后还剩多少
- android源码编译资源下载
- 51nod-【1096 距离之和最小】
- 程序员该如何管理后宫:朕只爱一个皇后!(单例模式)