Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Commit

Permalink
feat(carousel): add model binding support to slide
Browse files Browse the repository at this point in the history
- Add support for binding slide model to slide
  • Loading branch information
wesleycho committed Aug 13, 2015
1 parent 575eb85 commit 2871346
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/carousel/carousel.js
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ function CarouselDemoCtrl($scope) {
},
scope: {
active: '=?',
actual: '=?',
index: '=?'
},
link: function (scope, element, attrs, carouselCtrl) {
Expand Down
6 changes: 4 additions & 2 deletions src/carousel/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ The carousel also offers support for touchscreen devices in the form of swiping.

Use a `<carousel>` element with `<slide>` elements inside it. It will automatically cycle through the slides at a given rate, and a current-index variable will be kept in sync with the currently visible slide.

Use the `no-wrap` attribute on a `<carousel>` element to control the looping of slides; setting `no-wrap` to an expression which evaluates to a truthy value will prevent looping
Use the `no-wrap` attribute on a `<carousel>` element to control the looping of slides; setting `no-wrap` to an expression which evaluates to a truthy value will prevent looping.

Use the `template-url` attribute on a `<carousel>` or `<slide>` element to specify the url of a custom template to override the default templates
Use the `template-url` attribute on a `<carousel>` or `<slide>` element to specify the url of a custom template to override the default templates.

Use the `actual` attribute on a `<slide>` element to bind the slide model (or any object of interest) onto the slide directive's `$scope`, which makes it available for customization in the carousel template.

0 comments on commit 2871346

Please sign in to comment.