我试图以这种方式设置Rootpage 它的工作,但在导航时显示错误说"导航控制器被销毁"或"插入的视图已被销毁。" 有人可以帮我吗?
this.storage.get('hasSeenTutorial')
.then((hasSeenTutorial) =>
{
if (hasSeenTutorial)
{
afAuth.authState.subscribe(auth =>
{
if(auth)
{
this.rootPage = 'TabsPage';
toaster.setMessage('Has Seen Tutorial YES Auth');
toaster.present();
}
else
{
this.rootPage = 'LoginPage';
toaster.setMessage('Has Seen Tutorial NOT Auth');
toaster.present();
}
});
}
else
{
this.rootPage = 'TutorialPage';
toaster.setMessage('Has NOT Seen Tutorial');
toaster.present();
}
});