Skip to main content
added 83 characters in body
Source Link
sebaferreras
  • 44.7k
  • 11
  • 120
  • 137

Use the instances that Angular injects in the constructor objects (DI) instead of the static methods of the StatusBar and the SplashScreen classes, as shown below.:

initializeApp() {
    this.platform.ready().then(() => {
        this.statusBar.styleDefault();
        this.splashScreen.hide();
    });
  }

Use constructor objects (DI) of StatusBar and SplashScreen as shown below.

initializeApp() {
    this.platform.ready().then(() => {
      this.statusBar.styleDefault();
      this.splashScreen.hide();
    });
  }

Use the instances that Angular injects in the constructor (DI) instead of the static methods of the StatusBar and the SplashScreen classes, as shown below:

initializeApp() {
    this.platform.ready().then(() => {
        this.statusBar.styleDefault();
        this.splashScreen.hide();
    });
}
Source Link
Sampath
  • 66.2k
  • 70
  • 326
  • 461

Use constructor objects (DI) of StatusBar and SplashScreen as shown below.

initializeApp() {
    this.platform.ready().then(() => {
      this.statusBar.styleDefault();
      this.splashScreen.hide();
    });
  }