devmark / angular-slick-carousel

Angular directive for slick-carousel
http://devmark.github.io/angular-slick-carousel/
MIT License
353 stars 125 forks source link

pushing new element breaks the slick #152

Open Suryalg opened 3 years ago

Suryalg commented 3 years ago

when I am emptying the slides and reassigns object to the scope it looks fine but pushing new element breaks the slick I cant empty the scope as it will create a blink.

So is their solution like after pushing or poping an element I re initiate the slick

Suryalg commented 3 years ago

$scope.slickConfigBankAccount = { enabled: true, draggable: true, variableWidth: true, autoplaySpeed: 3000, infinite:false, slidesToShow: 3, slidesToScroll: 1, method: {}, event: { beforeChange: function(event, slick, currentSlide, nextSlide) {}, afterChange: function(event, slick, currentSlide, nextSlide) {} } }; $rootScope.lists.bankaccounts={}; $rootScope.lists.bankaccounts = data.responseObject; ...seems fine

$rootScope.lists.bankaccounts.push(newelement); ...diesnot work