From 83400033a3b7a91ad072a5d306355c9cd5a80d82 Mon Sep 17 00:00:00 2001 From: PliablePixels Date: Fri, 24 Jul 2015 15:48:01 -0400 Subject: integrated event scrubbing with direct image access - need to clean up code --- .../src/directives/rn-carousel-indicators.js | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 www/lib/angular-carousel/src/directives/rn-carousel-indicators.js (limited to 'www/lib/angular-carousel/src/directives/rn-carousel-indicators.js') diff --git a/www/lib/angular-carousel/src/directives/rn-carousel-indicators.js b/www/lib/angular-carousel/src/directives/rn-carousel-indicators.js new file mode 100755 index 00000000..f4cc1bd5 --- /dev/null +++ b/www/lib/angular-carousel/src/directives/rn-carousel-indicators.js @@ -0,0 +1,26 @@ +angular.module('angular-carousel') + +.directive('rnCarouselIndicators', ['$parse', function($parse) { + return { + restrict: 'A', + scope: { + slides: '=', + index: '=rnCarouselIndex' + }, + templateUrl: 'carousel-indicators.html', + link: function(scope, iElement, iAttributes) { + var indexModel = $parse(iAttributes.rnCarouselIndex); + scope.goToSlide = function(index) { + indexModel.assign(scope.$parent.$parent, index); + }; + } + }; +}]); + +angular.module('angular-carousel').run(['$templateCache', function($templateCache) { + $templateCache.put('carousel-indicators.html', + '' + ); +}]); -- cgit v1.2.3