mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
fix(scroll): $historyId should default to root
This commit is contained in:
11
js/angular/controller/scrollController.js
vendored
11
js/angular/controller/scrollController.js
vendored
@@ -32,7 +32,16 @@ function($scope, scrollViewOptions, $timeout, $window, $location, $document, $io
|
||||
|
||||
var deregisterInstance = $ionicScrollDelegate._registerInstance(
|
||||
self, scrollViewOptions.delegateHandle, function() {
|
||||
return !$scope.$$disconnected && $ionicHistory.currentHistoryId() == $scope.$historyId;
|
||||
if ($scope.$$disconnected) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var currentHistoryId = $ionicHistory.currentHistoryId();
|
||||
if (currentHistoryId) {
|
||||
return currentHistoryId == (isDefined($scope.$historyId) ? $scope.$historyId : 'root');
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user