Function to show and hide Splashscreen is not working?

I’m trying to activate the Splashscreen in one page and set it off three seconds later…

I try with this but doesn’t working and i don’t know why. Anyone can help me?

  showSplash(){

    this.splashScreen.show();

    setTimeout(function () {
      this.splashScreen.hide();
    }, 3000);
  }

Never type function, particularly within one.

Instead, utilize fat arrows:

setTimeout(() => {
      this.splashScreen.hide();
    }, 3000);
1 Like