A few questions for a noob

Hey guys,

I just started using Ionic a few days ago and I have 2 questions that might get a quick answer.

First I’d like to know if the ion slide loads its content on the page load or when it is displayed. If the answer is “on page load” is there a way to implement a lazyload-like slide system easily ?

My second question is also very simple. I’m trying to put a background image to some of my slides with the scss of that page. I’m using the “background: url()” property but it doesn’t seem to work. I tried several options, let’s say my paths are as follow :
src>pages>dummy.scss
src>pictures>backgrounds>slidea.png

I figured my url should be “./pictures/backgrounds/slidea.png” however this doesn’t seem to work, I guess this is because the sass is then compiled into css, and the whole app gets a new structure. So what should the path be in my case?

Thanks :slight_smile:

N.B.: Also for whatever reason the slides preview (ionic serve -l) doesn’t work on Android, but it works fine for the iOS preview and it runs normally on my device (ionic run android), so it might just be a bug.

They load when the page is rendered. See Swiper for more details.

Not sure if lazy loading is easy, but it is possible for the content within, ie: images.

As for your css question: just like most styling issues found in Ionic, you’ll need to try and try and try. Just know that your objective is possible. Make sure you’re working on the newest version of the platform.

Most importantly, don’t use the lab switch!

ionic serve -l
ionic serve -lab

It does not work!! You’ll see it working… so it seems. Then you try it out in the real world, and you see your code behaving very differently. The lab switch only works for the most straight-forward of programs.

In Chrome, right-click > Inspect > (choose the mobile/tablet icon).

Good luck,
Ryan