From 2687324a1b840fc52878f63834a94a2d8b9df596 Mon Sep 17 00:00:00 2001 From: Yuri Petusko Date: Tue, 29 Oct 2013 15:27:04 +0000 Subject: [PATCH 1/2] e is undefined and angular normalizes methods so onSlideEnd attribute becomes onslideend --- swiper.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/swiper.js b/swiper.js index 2350c4e..0523467 100755 --- a/swiper.js +++ b/swiper.js @@ -16,9 +16,10 @@ angular.module('swiper', []) if ( attrs.speed ) { config.speed = parseInt(attrs.speed,10); } - if ( attrs.onSlideEnd ) { - var onSlideEnd = $parse(attrs.onSlideEnd); - config.callback = function(e, index, slide) { + + if ( attrs.onslideend ) { + var onSlideEnd = $parse(scope[attrs.onslideend]); + config.callback = function(index, slide) { scope.$apply(function() { onSlideEnd(scope, { index: index, slide: slide}); }); From bd568be89743d2cee631db7f2a1b61fe340b2573 Mon Sep 17 00:00:00 2001 From: Yuri Petusko Date: Tue, 29 Oct 2013 15:28:02 +0000 Subject: [PATCH 2/2] adding ability to add continuous='true' attribute to html to make swipejs scroll continuesly --- swiper.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/swiper.js b/swiper.js index 0523467..5fa1cba 100755 --- a/swiper.js +++ b/swiper.js @@ -10,6 +10,9 @@ angular.module('swiper', []) if ( attrs.auto ) { config.auto = parseInt(attrs.auto,10); } + if ( attrs.continuous ) { + config.continuous = true; + } if ( attrs.startSlide ) { config.startSlide = parseInt(attrs.startSlide,10); }