use accept slider directive
This commit is contained in:
parent
32c30e7041
commit
473feddfc8
7 changed files with 118 additions and 108 deletions
|
|
@ -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');
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue