zoukankan      html  css  js  c++  java
  • ionic

    ionic 中$ionicView.beforeEnter(页面刚加载前)  $ionicView.afterEnter  (页面加载完成) $destroy(页面销毁) 广播事件 

    //ionic controller刚加载执行的广播通知方法
    1. $scope.$on('$ionicView.beforeEnter', function() {  
    2.             
    3.   console.log('beforeEnter'); 
    4. });   
    复制代码


    //ionic controller全部加载完成 执行的广播通知方法 (数据全部请求完成)

    1. $scope.$on('$ionicView.afterEnter', function() {  
    2.                 console.log('afterEnter');  
    3. }, false);  
    复制代码



    //ionic controller全页面销毁 执行的广播通知方法 

    1. $scope.$on('$destroy',function(){            
    2. console.log('$destroy');           
    3.   $rootScope.hideTabs = ' ';
    4. })   
  • 相关阅读:
    WC命令
    dcoker machine
    linux命令
    Valgrind 检测程序内存使用
    golang flag
    面试之---二叉树的遍历
    FFMpeg 版本错误
    C++中namespace的使用
    QT之QStatusBar
    建立ftp服务器和客户端
  • 原文地址:https://www.cnblogs.com/jayruan/p/5568627.html
Copyright © 2011-2022 走看看