修复slicker unslick问题angularjs

时间:2016-09-26 12:39:32

标签: javascript angularjs

即时使用此扩展的原始内容,导致其angularjs:http://vasyabigi.github.io/angular-slick/

orginal slick(jquery):http://kenwheeler.github.io/slick/

但是当我使用它时,点击它我得到:

angular.js:13920 TypeError: slider.unslick is not a function
    at lib/angular-slick/dist/slick.js:60:20
    at /lib/angular/angular.js:19612:31
    at completeOutstandingRequest (/lib/angular/angular.js:5964:10)
    at /lib/angular/angular.js:6243:7 undefined

slick.js片段:60:20:

destroySlick = function () {
      return $timeout(function () {
        var slider;
        slider = $(element);
        slider.unslick();
        slider.find('.slick-list').remove();
        return slider;
      });
    };

失败了:

 slider.unslick();

任何想法如何解决我的unlick问题?

如果我改变

  slider.unslick();

    slider.slick('unslick');

然后当我再次点击它们时,我的ng-clicks不会执行。

1 个答案:

答案 0 :(得分:0)

来自文档 - slider.slick('unslick');