ngx-owl-carousel
ngx-owl-carousel copied to clipboard
On Click event does not work with loop
I have the following piece of code
<owl-carousel [options]="owlOptions" [items]="slides" [carouselClasses]="['owl-theme', 'row', 'sliding','ml-auto','mr-auto']" #owlElement>
<div class="item" *ngFor="let image of slides" (click)="changeMainSlide(image)">
<div class="nav-content text-white text-capitalize">
<h6 class="mb-0">
<small class="d-block">{{image.date | date:'dd MMM'}} <span class="badge badge-pill badge-light text-uppercase small">{{image.type}}</span></small>
<span class="animated fadeIn">{{image.artistInfo}}</span>
</h6>
<small class="d-block"><strong>{{image.plainAddress}}</strong></small>
</div>
<img src="{{image.images.slider}}" />
</div>
</owl-carousel>
The click event fires only when I click the slides that are in view, and not the ones off the stage. My owlOptions also has loop: true set, could this have a possible impact?
Facing same issue with below parameters
autoWidth:true,
loop:true
Kindly provide solution
@mujtaba01 Figured out that this changes not there on JS file.
Can you do that. https://github.com/OwlCarousel2/OwlCarousel2/pull/2021/files
I manually change in dist folder and able to get click event.
Thanks @shabbir-dhangot,
To fix this issue changes have to made in the original owl.carousel.js file and cannot make changes in original owl.carousel.js file. I will include a separate fixed version of the file in the package shortly.
@mujtaba01 Any update on this. This is super important
@mujtaba01 no updates???
@mujtaba01 Waiting for your update from so long
I made the changes in owl.carousel.js dist folder, but (click) doesen`t work yet? Anny idea?