Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added 'auto-play' as API's attribute to slideBox.js #1552

Closed
wants to merge 1 commit into from
Closed
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
4 changes: 3 additions & 1 deletion js/angular/directive/slideBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
*
* @param {string=} delegate-handle The handle used to identify this slideBox
* with {@link ionic.service:$ionicSlideBoxDelegate}.
* @param {boolean=} auto-play Whether the slide box should continuously slide.
* @param {boolean=} does-continue Whether the slide box should automatically slide.
* @param {number=} slide-interval How many milliseconds to wait to change slides (if does-continue is true). Defaults to 4000.
* @param {boolean=} show-pager Whether a pager should be shown for this slide box.
Expand All @@ -45,6 +46,7 @@ function($timeout, $compile, $ionicSlideBoxDelegate) {
replace: true,
transclude: true,
scope: {
autoPlay: '@',
doesContinue: '@',
slideInterval: '@',
showPager: '@',
Expand All @@ -57,7 +59,7 @@ function($timeout, $compile, $ionicSlideBoxDelegate) {
var _this = this;

var continuous = $scope.$eval($scope.doesContinue) === true;
var slideInterval = continuous ? $scope.$eval($scope.slideInterval) || 4000 : 0;
var slideInterval = $scope.$eval($scope.autoPlay) ? $scope.$eval($scope.slideInterval) || 4000 : 0;

var slider = new ionic.views.Slider({
el: $element[0],
Expand Down