简体   繁体   中英

Angular JS carousel not working

I am having issues with the following angular carousel click here my angular controller doesn't seem to be working which is calling out the images. click here for my source code I have pretty followed the code demonstrated in the demo. However i am not having any joy getting my images to display. Can someone pin-point exactly where i am going wrong?

  <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指令前面的“数据”。

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.

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