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