[英]Can't get angular-carousel to work
我正在使用角度輪播創建一個簡單的輪播。 但是,我無法使其正常工作。 這是我的朋克。 我正在使用1.3.15版。
沒有錯誤,但我只是得到了一個空白屏幕,如插塞。
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>
您可以正常工作,但也許CSS正在隱藏li
元素上的文本。 您可以將rn-carousel-controls
添加到ul
元素,然后會看到兩個箭頭,可讓您在幻燈片之間移動。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.