mihnsen / ui-carousel

A simple, lightweight module for carousel in your AngularJS app, Inspired from slick carousel.
http://mihnsen.github.io/ui-carousel/
MIT License
77 stars 67 forks source link

on-after-change and on-before-change errors #8

Open f10l opened 7 years ago

f10l commented 7 years ago

Hey,

sorry for the next issue in a row :(

I tried to use on-after-change (or on-before-change) and they both give an error (at the first click, at init everything works):

console_runner-079c09a….js:1 TypeError: Cannot use 'in' operator to search for 'carouselDemo' in 1
    at fn (eval at compile (https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.1/angular.min.js:237:285), <anonymous>:4:61)
    at Object.d.(anonymous function) [as onAfterChange] (https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.1/angular.min.js:86:278)
    at http://vckit.themelego.com/wp-content/themes/twentyfifteen/ui-carousel.min.js:1:3756
    at https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.1/angular.min.js:160:433
    at f (https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.1/angular.min.js:47:148)
    at https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.1/angular.min.js:50:68

More is in the codepen: http://codepen.io/anon/pen/BWXNjQ

Unfortunately I did not find any way to search deeper for the trouble and can not exclude some wrong usage.

Best regards, Fabian

mihnsen commented 7 years ago

@fanick-ber I fixed this issue on 7e6735a. See pen: http://codepen.io/mihnsen/pen/vmWppq

f10l commented 7 years ago

thanks a lot for the fixes :)