Skip to content

Instantly share code, notes, and snippets.

@kshreve
Last active August 29, 2015 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kshreve/9523529ade8169a7fab8 to your computer and use it in GitHub Desktop.
Save kshreve/9523529ade8169a7fab8 to your computer and use it in GitHub Desktop.
AngularJS - Carousel - Source http://jsbin.com/zahime
<div ng-app="myApp" carousel>
<div ng-repeat="slide in slides" ng-show="selectedIndex == $index">
<img ng-src="{{slide}}" />
</div>
<button class="button" ng-click="toIndex(selectedIndex-1)"><</button>
<span ng-repeat="slide in slides">
<button class="button" ng-click="toIndex($index)">{{ $index + 1 }}</button>
</span>
<button class="button" ng-click="toIndex(selectedIndex+1)">></button>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment