Ionic 4, background image

Hello,
I am trying to add image on my home screen as i am getting image path from api so i’m using style="background-image: url({{flag}})", i want to add multiple images on my background. Or you can say i want to add 2 images one half of screen will have one flag and the other half will have the second flag.

<ion-content>
   <div style="background-image: url({{toFlag}})">
   <div style="background-image: url({{fromFlag}})">

  <.......Code......>

   </div>
   </div>
</ion-content>

How can i be able to add 2 images on ion-content by giving them 2 parts.
Thanks

try this example

<ion-content>


  <div class="img_conn" style="background-image: url('../../../assets/app_icon/img1.jpg')"></div>
  <div class="img_conn" style="background-image: url('../../../assets/app_icon/img2.jpeg')"></div>

  
  
</ion-content>
.img_conn{
    height: 50vh;
    width: 100%;
    display: block;
    background-size: cover;
    background-repeat: no-repeat;
}

i hope its worked for you

Thank you, but i want to get images from api’s

add your image path in url( {{image_path}} )