angular-ui/bootstrap — pull request #18 by joshkurz (2012-11-04 10:04:07+00:00)
Title: Added the carousel directive

The carousel uses the same style of tranclusion as the tabs directive. The main difference between this directive and how the tabs works is instead of using ng-class to hide the slides we are using ng-show. This gives us the ability to set the active $index of the array which is stored in the controller.

The active index is manipulated to express the input.

Main functions at the moment are:

pause()
resume()
startSlides()
next()
prev()
addSlide()
removeSlide()

I would like to add setActive() at some point. This proved to be somewhat difficult, because there is a need to communicate with the directive from outside of the templated html. For now though I think this covers the basic functionality of the carousel.

Here is a live demo. http://plnkr.co/edit/bzbSud?p=preview