If you would be so kind, can I ask what I am missing here:
html:
<div class="swiper engageSwiper">
<!-- Additional required wrapper -->
<div class="swiper-wrapper">
<!-- Slides -->
@for (object of featuredEvents(); track object) {
<div class="swiper-slide" (click)="navigateToEvents()">
<img ngSrc="{{object.imageUrl}}" class="custom" style="height: auto; width: auto" priority
width="1920" height="1080" alt="" ngSrcset="100w, 200w, 400w, 600w, 800w, 1200w, 1920w, 2560w">
</div>
}
</div>
<!-- If we need pagination -->
<div class="swiper-pagination"></div>
</div>
.ts:
public swiper = new Swiper('.engageSwiper', {
// configure Swiper to use modules
modules: [Navigation, Pagination],
spaceBetween: 10,
pagination: {clickable: true},
navigation: {
nextEl: '.swiper-button-next',
prevEl: '.swiper-button-prev'
},
slidesPerView: 1,
centeredSlides: true,
loop: true,
effect: "coverflow",
autoplay: {
delay: 2000,
reverseDirection: true,
disableOnInteraction: true
},
coverflowEffect: {
rotate: 0,
stretch: 0,
depth: 100,
modifier: 2.5
},
breakpoints: {
700: {
slidesPerView: 2,
centeredSlides: true
},
1100: {
slidesPerView: 3,
centeredSlides: true
},
2050: {
slidesPerView: 3,
centeredSlides: true,
setWrapperSize: true
}
}
});
The swiper does show on my webpage, but the swiper object that I created in my .ts I'm assuming is not being connected to my HTML tag? I am not sure how you ddi the viewChild thing either as i was trying to do research on that.