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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.