$ionicView events not firing in ios


#1

Hey there,

I have an app that makes use of the $ionicView events. My code looks like this:

> angular.module('pod').controller('HomeController', function($scope, $rootScope) {
>   var vm = this;
>   vm.makeDelivery = function() {
>     $state.go('delivery');
>   }
>   $scope.$on('$ionicView.afterEnter', function() {
>     console.log('AFTER ENTER FIRED');
>   });
>   $scope.$on('$ionicView.loaded', function() {
>     console.log('LOADED FIRED');
>   })
>   $scope.$on('$ionicView.beforeEnter', function() {
>     console.log('BEFORE ENTER FIRED');
>   })
>   $scope.$on('$ionicView.enter', function() {
>     console.log('ENTER FIRED');
>   })
> })

These events fire on Android, but they don’t on ios. I tried setting the cache-view in the html to false, but that had no effect. Any thoughts on why ios would behave this way? I’m using ios 9, could that be an issue?

Thanks!


#2

So after some further digging, it looks like the event fires the first time the view is entered, but doesn’t after that. Any ideas how to keep it firing?