当前位置: 动力学知识库 > 问答 > 编程问答 >

javascript - 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.

There are no errors but I just get a blank screen as in the plunker.

JS(script.js):

var app = angular.module('starterApp', ['angular-carousel']);

app.controller('tempCtrl', ['$scope', function($scope) {

}])

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. You can add rn-carousel-controls to the ul element and will see the two arrows that let you move between the slides.

分享给朋友:
您可能感兴趣的文章:
随机阅读: