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();
}