Open nidzovito opened 8 years ago
I have the same issue
I have this issue as well.
+1
+1 Same here
Is there anyway to add a watch data option that will cause it to reload on change? It would need to have a watch, watchDeep, and maybe a , watchCollection option for it. Or a watch-data and watch-type
Wait, there is a watch on the data option. Just found it when looking at the code, seemd you need to initOnload to use it
if (scope.initOnload) {
isInitialized = false;
return scope.$watch('data', function (newVal, oldVal) {
if (newVal != null) {
if (isInitialized) {
destroySlick();
}
initializeSlick();
return isInitialized = true;
}
});
} else {
return initializeSlick();
}
<slick data="panel.properties" init-onload="true">
can u replace watch to watchCollection in https://github.com/vasyabigi/angular-slick/blob/master/dist/slick.js#L147 ? This callback is not triggered if you remove an element from collection by splice for example.
<slick id="propertySlider" next-arrow=".content-next" prev-arrow=".content-prev" draggable="false" slides-to-show="1" slides-to-scroll="1" swipe="false" data="panel.properties" class="slider" init-onload=false lazy-load='ondemand'