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

feat(rn-carousel-indicators): prevent click event from bubbling up #432

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions dist/angular-carousel.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Angular Carousel - Mobile friendly touch carousel for AngularJS
* @version v1.0.2 - 2016-11-25
* @version v1.0.2 - 2017-06-07
* @link http://revolunet.github.com/angular-carousel
* @author Julien Bouquillon <[email protected]>
* @license MIT License, http://www.opensource.org/licenses/MIT
Expand Down Expand Up @@ -62,7 +62,8 @@ angular.module('angular-carousel')
templateUrl: 'carousel-indicators.html',
link: function(scope, iElement, iAttributes) {
var indexModel = $parse(iAttributes.rnCarouselIndex);
scope.goToSlide = function(index) {
scope.goToSlide = function(event, index) {
event.stopPropagation();
indexModel.assign(scope.$parent.$parent, index);
};
}
Expand All @@ -72,7 +73,7 @@ angular.module('angular-carousel')
angular.module('angular-carousel').run(['$templateCache', function($templateCache) {
$templateCache.put('carousel-indicators.html',
'<div class="rn-carousel-indicator">\n' +
'<span ng-repeat="slide in slides" ng-class="{active: $index==index}" ng-click="goToSlide($index)">●</span>' +
'<span ng-repeat="slide in slides" ng-class="{active: $index==index}" ng-click="goToSlide($event, $index)">●</span>' +
'</div>'
);
}]);
Expand Down
Loading