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', '' ); }]);