I am trying to dynamically load a div called image-background
. Can anyone guide me on how to achieve this?
<div
class="sub-service-box"
v-for="item in serviceCategories[itemIndex].services"
:key="item._id"
>
<div
class="background-img"
:style="{ backgroundImage: 'url(' + item.imageUrl + ')' }"
>
</div>
</div>
The array serviceCategories[itemIndex].services is populated by an API call.