use accept slider directive

This commit is contained in:
Gabriel Bazán 2016-09-20 15:28:31 -03:00
commit 473feddfc8
7 changed files with 118 additions and 108 deletions

View file

@ -162,4 +162,20 @@ angular.module('copayApp.directives')
});
}
}
})
.directive('accept', function($log, profileService, walletService, lodash) {
return {
restrict: 'E',
templateUrl: 'views/includes/acceptSlide.html',
scope: {},
link: function(scope, element, attrs) {
scope.$on("$ionicSlides.sliderInitialized", function(event, data) {
scope.slider = data.slider;
});
scope.$on("$ionicSlides.slideChangeEnd", function(event, data) {
if (data.slider.activeIndex == 0) scope.$emit('accepted');
});
}
}
});