My goal is to utilize ionViewWillEnter in order to verify if the user is logged in. If the check returns false, I want to direct them to the login page and then proceed with the initializeapp function. My experience with Angular and Ionic is still limited, so any advice or suggestions would be greatly appreciated.
ionViewCanEnter() {
console.log("1");
console.log(this.userSevice.isUserLoggedIn());
if (this.userSevice.isUserLoggedIn() === false){
this.nav.push(LoginPage);
alert("user is logging in");
}
else{
this.initializeApp();
}
}