mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
feat($ionicScrollDelegate): rememberScrollPosition, scrollToRememberedPosition
/**
* @ngdoc method
* @name $ionicScrollDelegate#rememberScrollPosition
* @description
*
* When this scroll area is destroyed, its last scroll position will be
* saved using the given id.
*
* @param {string} id The identifier for this saved scroll position.
*/
/**
* @ngdoc method
* @name $ionicScrollDelegate#scrollToRememberedPosition
* @description
*
* If a scroll position was remembered using the given id, loads the
* remembered scroll position and scrolls there.
*
* @param {string} id The identifier for this saved scroll position.
* @param {boolean=} shouldAnimate Whether to animate the scroll.
*/
This commit is contained in:
6
js/ext/angular/src/directive/ionicContent.js
vendored
6
js/ext/angular/src/directive/ionicContent.js
vendored
@@ -61,10 +61,9 @@ angular.module('ionic.ui.content', ['ionic.ui.service', 'ionic.ui.scroll'])
|
||||
.directive('ionContent', [
|
||||
'$parse',
|
||||
'$timeout',
|
||||
'$ionicScrollDelegate',
|
||||
'$controller',
|
||||
'$ionicBind',
|
||||
function($parse, $timeout, $ionicScrollDelegate, $controller, $ionicBind) {
|
||||
function($parse, $timeout, $controller, $ionicBind) {
|
||||
return {
|
||||
restrict: 'E',
|
||||
replace: true,
|
||||
@@ -135,9 +134,6 @@ function($parse, $timeout, $ionicScrollDelegate, $controller, $ionicBind) {
|
||||
});
|
||||
//Publish scrollView to parent so children can access it
|
||||
scrollView = $scope.$parent.scrollView = scrollCtrl.scrollView;
|
||||
|
||||
var delegate = $ionicScrollDelegate($scope);
|
||||
delegate.rememberScrollPosition();
|
||||
}
|
||||
|
||||
transclude($scope, function(clone) {
|
||||
|
||||
Reference in New Issue
Block a user