如何在angularjs

时间:2018-01-07 16:12:16

标签: javascript jquery angularjs slick-slider

我有光滑的滑块

    <div class="slider">
      <div><img src="img/seasons/spring.jpg" alt=""></div>
      <div><img src="img/seasons/summer.jpg" alt=""></div>
      <div><img src="img/seasons/winter.jpg" alt=""></div>
    </div>

的js

 $(document).ready(function () {
        $('.slider').slick({
            dots: true,
            infinite: true,
            speed: 500,
            fade: true,
            cssEase: 'linear',
            autoplay:true,
            adaptiveHeight:true,

        });
    });

它适用于任何地方,但我需要在块中使用此滑块,它不能在这里工作

<div ng-repeat="forecast in forecasts.list" class="forecast"> 
  <p>{{ forecast.dt_txt}}</p>
  <button ng-click="toggle = !toggle">Go</button>
  <div ng-show="toggle">
    <div class="slider">
      <div><img src="img/seasons/spring.jpg" alt=""></div>
      <div><img src="img/seasons/summer.jpg" alt=""></div>
      <div><img src="img/seasons/winter.jpg" alt=""></div>
    </div>
  </div> 
</div>

如何解决?

0 个答案:

没有答案