2017-08-17 119 views
0

我已經添加了所有的腳本和CSS,它是單獨運行HTML頁面時工作,但不是當應用程序運行時。控制檯中沒有顯示任何內容。我已經嘗試在索引頁面中添加css和js引用。滑動滑塊不工作在AngularJS應用程序

可能是什麼問題?

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> 

<link rel='stylesheet prefetch' href='http://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css'> 

<link rel='stylesheet prefetch' href='https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.5.5/slick.min.css'> 
<div class="slider responsive"> 
       <div> 
        <img src="http://placehold.it/200x150" alt="" /> 
       </div> 
       <div> 
        <img src="http://placehold.it/200x150" alt="" /> 
       </div> 
       <div> 
        <img src="http://placehold.it/200x150" alt="" /> 
       </div> 
       <div> 
        <img src="http://placehold.it/200x150" alt="" /> 
       </div> 
       <div> 
        <img src="http://placehold.it/200x150" alt="" /> 
       </div> 
       <div> 
        <img src="http://placehold.it/200x150" alt="" /> 
       </div> 
       <div> 
        <img src="http://placehold.it/200x150" alt="" /> 
       </div> 
       <div> 
        <img src="http://placehold.it/200x150" alt="" /> 
       </div> 
    </div> 


<script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> 

<script src='https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.5.5/slick.min.js'></script> 

<script src="js/slider.js"></script> 

<script> 
$(function() { 
$('.slider').slick(); 
}); 
</script> 

回答

1

你提到了它的一個angularjs應用程序,但我沒有看到在你的HTML中引用的angularJS。如果你想光滑轉盤的angularJS版本,請檢查了這一點:

http://devmark.github.io/angular-slick-carousel/#/

讓我知道如何去。

注意:這應該是一個評論,但回答,因爲我沒有足夠的評論點。