[英]Ionic 2 , appear white blank screen after splash screen and before main page
[英]Ionic always show blank screen after splash screen
我有一個離子項目,所以在我運行這個構建之后
ionic cordova run ios -l --consolelogs --target='2E565780-E17E-4358-8DD0-FFA9681D5F8C'
通常它工作正常,但不知何故現在我得到了錯誤。 觸發啟動畫面后,它總是向我顯示空白屏幕。 我已經把這個 function
ngOnInit() {
console.log(this.platform);
this.platform.ready().then(() => {
if (this.platform.is("cordova")) {
this.statusBar.styleDefault();
this.splashScreen.hide();
});
}
在 app.component 上,但似乎沒有觸發。 有沒有我錯過的工作? 任何幫助將非常感激。
嘗試添加 function 以從您的 app.component 構造函數執行:
constructor( ... ){
this.initializeApp();
}
initializeApp(){
this.platform.ready().then(() => {
if (this.platform.is("cordova")) {
this.statusBar.show();
this.statusBar.styleDefault();
this.splashScreen.hide();
}
});
}
我解決了這個問題,它與我添加的插件有關,所以我嘗試這樣做
希望對遇到同樣問題的人有所幫助。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.