简体   繁体   English

无法使旋转木马工作

[英]Can't get angular-carousel to work

I am using angular-carousel to create a simple carousel. 我正在使用角度轮播创建一个简单的轮播。 However, I cannot get it to work. 但是,我无法使其正常工作。 Here's my plunker. 这是我的朋克。 I am using version 1.3.15. 我正在使用1.3.15版。

There are no errors but I just get a blank screen as in the plunker. 没有错误,但我只是得到了一个空白屏幕,如插塞。

JS(script.js): JS(script.js):

var app = angular.module('starterApp', ['angular-carousel']);
app.controller('tempCtrl', ['$scope', function($scope) {

}])

HTML: HTML:

<html>

  <head>
    <link rel="stylesheet" href="style.css">
    <link rel="stylesheet" href="angular-carousel.css">
  </head>

  <body ng-app="starterApp">
    <div ng-controller="tempCtrl">
      <ul rn-carousel>
        <li>Map</li>
        <li>Cloud</li>
      </ul>
    </div>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.15/angular.min.js"></script>
    <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular-touch.min.js"></script>
    <script src="angular-carousel.js"></script>
    <script src="script.js"></script>
  </body>

</html>

You have it working fine, but maybe the css is hidding the text on the li elements. 您可以正常工作,但也许CSS正在隐藏li元素上的文本。 You can add rn-carousel-controls to the ul element and will see the two arrows that let you move between the slides. 您可以将rn-carousel-controls添加到ul元素,然后会看到两个箭头,可让您在幻灯片之间移动。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM