From 3d8c81dba6324cd6facbb0cef5ed0195964e9cc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=BC=E7=A0=BC?= Date: Mon, 15 Jun 2015 10:26:50 +0800 Subject: [PATCH] rnCarouselControlsAllowLoop --- src/directives/rn-carousel.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/directives/rn-carousel.js b/src/directives/rn-carousel.js index 9399643..c4e1e4b 100755 --- a/src/directives/rn-carousel.js +++ b/src/directives/rn-carousel.js @@ -374,10 +374,11 @@ if (iAttributes.rnCarouselControls!==undefined) { // dont use a directive for this + var canloop = ((isRepeatBased ? scope[repeatCollection.replace('::', '')].length : currentSlides.length) > 1) ? angular.isDefined(tAttributes['rnCarouselControlsAllowLoop']) : false; var nextSlideIndexCompareValue = isRepeatBased ? repeatCollection.replace('::', '') + '.length - 1' : currentSlides.length - 1; var tpl = ''; iElement.parent().append($compile(angular.element(tpl))(scope)); }