您的位置:首页 > 其它

ionic

2016-06-07 22:59 134 查看
ionic 中$ionicView.beforeEnter(页面刚加载前) $ionicView.afterEnter (页面加载完成) $destroy(页面销毁) 广播事件

//ionic controller刚加载执行的广播通知方法

$scope.$on('$ionicView.beforeEnter', function() {

console.log('beforeEnter');

});

复制代码

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

$scope.$on('$ionicView.afterEnter', function() {

console.log('afterEnter');

}, false);

复制代码

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

$scope.$on('$destroy',function(){

console.log('$destroy');

$rootScope.hideTabs = ' ';

})

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: