mujtaba01 / ngx-owl-carousel

An angular2 (4) wrapper for jquery owl-carousel library with dynamic carousel item change detection
MIT License
70 stars 25 forks source link

The event Callbacks don't seem to work #28

Closed fbele closed 6 years ago

fbele commented 6 years ago

Hi, I'm trying to configure the new npm package of Owl Carousel ('ngx-owl-carousel'), but it seems that the Event Callbacks, which I set in options, don't seem to get triggered.

My options: public carouselOptions: any = { items: 1, dots: false, navigation: false, onInitialized: (event) => { // something }, onDragged: (event) => { // something } };

But if I use the old npm package ('ng2-owl-carousel'), everything works fine. I also see that the Carousel doesn't seem to get loaded, since the child elements do not get wrapped (owl-items) and the Carousel itself never gets the class of 'owl-loaded'.

What could be wrong here? I'd really like to use the new version of the Carousel.

mujtaba01 commented 6 years ago

It seems to me that you have missed to include owl.carousel.js (node_modules/owl.carousel/dist/owl.carousel.js). ( In previous version it was included in the code. But in this version this file needs to be included explicitly.

fbele commented 6 years ago

Yes, you are right. Now it is working fine. Thank you.