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. }) 

 





免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM