From e81c2c17e5a1eb7afea499904240c2be066bc954 Mon Sep 17 00:00:00 2001 From: TossPig Date: Fri, 12 Jun 2015 05:52:39 +0800 Subject: [PATCH] Can loop Add a attribute `rnCarouselControlsCanLoop`. --- src/directives/rn-carousel.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/directives/rn-carousel.js b/src/directives/rn-carousel.js index 9399643..77d46c3 100755 --- a/src/directives/rn-carousel.js +++ b/src/directives/rn-carousel.js @@ -372,12 +372,13 @@ }); } - if (iAttributes.rnCarouselControls!==undefined) { + if (iAttributes.rnCarouselControls!==undefined) { // dont use a directive for this + var canloop = angular.isDefined(tAttributes['rnCarouselControlsCanLoop']); var nextSlideIndexCompareValue = isRepeatBased ? repeatCollection.replace('::', '') + '.length - 1' : currentSlides.length - 1; var tpl = ''; iElement.parent().append($compile(angular.element(tpl))(scope)); }