Open Mukeysh opened 6 years ago
@Mukeysh any news? I'm having the same question here
@dgbarbosa I have done this following: .html <owl-carousel [options]='{items: 1, dots: false, navigation: false, stagePadding: 30, margin:10, onDrag: this.owlDrag.bind(this)}' [items]="images" [carouselClasses]="['owl-theme', 'owl-package','sliding']"> <div class="item" *ngFor="let slide of slides">
{{slide.text}}
</div>
</owl-carousel>
.ts file owlDrag(event) {
}
add this in options:
mouseDrag: true,
touchDrag: true,
pullDrag: true,
add "(dragging)="startDragging($event.dragging)"
<owl-carousel-o [options]="customOptions" #owlElement (dragging)="startDragging($event.dragging)">
startDragging(event){
console.log(event);
}
I just want to know how to attach an event with the carousel. E.g: I want to attach onDragged callback with the carousel. Any help would be appreciated.