I am looking to incorporate multiple <div>
elements with content into the ngx-slick-carousel in my Angular 12 application. Currently, the carousel is displaying placeholder images and I am unsure of how to replace these images with div elements.
Here is the code snippet I am currently using:
app.component.html
<ngx-slick-carousel class="carousel" #slickModal="slick-carousel"
[config]="slideConfig"
(init)="slickInit($event)"
(breakpoint)="breakpoint($event)"
(afterChange)="afterChange($event)"
(beforeChange)="beforeChange($event)">
<div ngxSlickItem *ngFor="let slide of slides" class="slide"><img src="{{ slide.img }}" alt="" width="100%"></div>
</ngx-slick-carousel>
app.component.ts
slides = [
{img: "https://via.placeholder.com/600.png/021/fff"},
{img: "https://via.placeholder.com/600.png/321/fff"},
{img: "https://via.placeholder.com/600.png/422/fff"},
{img: "https://via.placeholder.com/600.png/654/fff"}
];
slideConfig = {"slidesToShow": 2, "slidesToScroll": 1};
I would appreciate any guidance on how I can implement div elements instead of image URLs for the carousel. Thank you.