javascript - Angular JS轮播不工作

标签 javascript html angularjs twitter-bootstrap

我在使用以下 Angular 轮播时遇到问题 click here我的 Angular Controller 似乎无法正常工作,它正在调出图像。 click here for my source code我非常关注演示中演示的代码。但是,让我的图像显示出来并没有让我感到高兴。有人可以准确指出我哪里出错了吗?

  <body np-app="myApp" ng-controller='demoController'>
<div>
    <ul data-rn-carousel rn-carousel-buffered rn-carousel-index="currentSport" class="image">
        <li ng-repeat="image in sportImages" style="background-image:url({{ image }});">
            <div class="layer" ng-bind-html-unsafe="image"></div>
        </li>
    </ul>

    <button ng-click="currentSport = currentSport - 1" ng-disabled="currentSport == 0">prev</button>
    <button ng-click="currentSport = currentSport + 1" ng-disabled="currentSport == sportImages.length - 1">next</button>

</div>
</body>

最佳答案

删除 rn-carousel 指令前面的“数据”。

关于javascript - Angular JS轮播不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19689902/

相关文章:

javascript - 问题 : ng-repeat with specific view should be displayed on click

javascript - 动态变化的 Angular 全局值

javascript - 为什么 Generator.prototype.return 会取值?

javascript - 如何使用 jquery 和/或 javascript 获取多个用户输入并将其存储在数组中,然后访问数组中的元素

php - (PHP/Postgresql) 调用返回 void 的函数?

javascript - 在 Kendo-AngularJS 应用程序中扩展 Kendo Widget

javascript - jQuery,循环遍历只有部分名称或 ID 已知的元素

javascript - 使用 node-debug 调试 Node js

javascript - 在 python 中抓取 javascript 页面

html - 向右扩展一个 div 到页面底部