mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
fix(slideBox): disable autoPlay when disconnected
This commit is contained in:
4
js/angular/controller/slideBoxController.js
vendored
4
js/angular/controller/slideBoxController.js
vendored
@@ -98,7 +98,9 @@ function(scope, element, $log, $document, $$q, $timeout, $interval, $$ionicAttac
|
||||
|
||||
if (angular.isNumber(newInterval) && newInterval > 0) {
|
||||
self.autoPlayTimeout = $interval(function() {
|
||||
self.select(self.next());
|
||||
if (!ionic.Utils.isScopeDisconnected(scope)) {
|
||||
self.select(self.next());
|
||||
}
|
||||
}, newInterval);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user