路由改变前
$rootScope.$on('$stateChangeStart', function(event,next,nextParams,fromState){
});
进入控制器前
$scope.$on('$ionicView.beforeEnter', function() {
});
$rootScope.$on('$stateChangeStart', function(event,next,nextParams,fromState){
});
$scope.$on('$ionicView.beforeEnter', function() {
});