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

Page redirect, which prevents $ionicView.afterEnter triggering

$
0
0

@ZephDavies wrote:

When the user views the home page, i'd like to redirect immediately to the introduction page given a certain flag.
The problem is, the "afterEnter" is triggering on the home page despite the introduction page now being visible.

I would like to redirect from home to intro while prevent afterEnter triggering on home.

For an example home page:

$scope.$on('$ionicView.beforeEnter', function () {
   if (goIntro) {
      $state.go("intro");
   } else {
      loadHomePage();
   }
}

$scope.$on('$ionicView.afterEnter', function () {
   console.log("I should not happen! if goIntro == true");
   // I do not want the one-off animation to occur while the intro page is viewed
   // Therefore i do not want this to happen, until we navigate to home after doing the intro
   runComplexAnimation();
}

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 49229

Trending Articles



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