Splash.png as page background


#1

How can I use resources/splash.png as the background of a page?

E.g.:

src/pages/login/login.html

<ion-content padding class="bg-splash">
...
</ion-content>

src/theme/variables.scss

.bg-splash {
  background: url('resources/splash.png') no-repeat;
  background-size: cover;
}

#2

The resources folder is not part of your app. The files in there are copied over to the platform at the build process.
If you want to use them, best copy the file over to assets and use it like normal.
Maybe there is also a native way to get the splash that is part of the app bundle, but I am not sure and don’t know how.


#3

Thanks Jan. Just knowing it’s not possible is a big help.


#4

Well, I don’t know how :wink: That might be a difference :stuck_out_tongue: