SplashScreen not working


I have installed cordova-plugin-splashscreen and in my config.xml I have:

  <preference name="SplashScreen" value="screen"/>
  <preference name="SplashScreenDelay" value="3000"/>

I also created splash.png and with

$ ionic resources --splash

I created splashscreens as screen.png

Now, when I run on device there is no splashscreen, so I created separte js file and I put:

onDeviceReady: function() {

function mySplash() {
setTimeout(function(){ navigator.splashscreen.hide(); }, 5000);


and than the splashscreen is shown, but first I can see home page for millisecond and then the splashscreen for 5 seconds.

How can i fix this, so it could be shown without js function onDeviceReady ?