【发布时间】:2019-07-05 20:35:54
【问题描述】:
我可以从存储中读取值,直到应用程序未关闭。 在我关闭浏览器并重新运行该应用程序后。我将从 storage.get 中获取 null 值
在教程页面中:
this.storage.set('hasSeenTutorial', 'true');
在component.ts中:
this.storage.get('hasSeenTutorial')
.then((hasSeenTutorial) => {
debugger;
if (hasSeenTutorial) {
this.selectRootPage();
} else {
this.rootPage = 'TutorialPage';
}
this.platformReady()
});
【问题讨论】:
标签: ionic-framework ionic3 storage