Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49167

$scope.on || $scope.watch -> $ionicView.before/after?

$
0
0

@CTucker1327 wrote:

I'm getting absolutely fed up with the unreliability of the $ionicView broadcasts. Is it a broadcast? Is it a value? What is it.

It seems like on every other page I have to switch from $scope.$on and $scope.$watch.

In one page, I have $scope.$on('$ionicView.beforeEnter') that's never called. On the same page $scope.$watch('$ionicView.beforeEnter') does get called. On another page, $scope.$on('$ionicView.beforeEnter') gets called, and the $scope.$watch doesn't. This is seriously annoying. I keep switching my whole app between $on and $watch and I never know which one to use.

The docs say to use $on but it isn't all rainbows and butterflies down here.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 49167

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>