ionic4 启动页白屏问题2019-04-18

参考:https://www.cnblogs.com/leisir/p/8392325.html
我的做法是在config.xml中加入



然后在进入的首页的ts文件(tabs-page.ts)中加入

import { Platform } from '@ionic/angular';
import { SplashScreen } from '@ionic-native/splash-screen/ngx';
//...
  constructor(
    private platform: Platform,
    private splashScreen: SplashScreen,
  
) { }
//...
 ngOnInit() {

    this.platform.ready().then(() => {

      setTimeout(() => { 
        this.splashScreen.hide();
      }, 2000)
      
    });

你可能感兴趣的:(ionic4 启动页白屏问题2019-04-18)