[英]anchor scroll with angular/ionic breaks layout and scrolling up is not possible anymore
This is my code: 这是我的代码:
if($state.current.name == "list") {
$scope.scrollToAnchorWithinCurrentPage = function(anchor) {
$location.hash(anchor);
var handle = $ionicScrollDelegate.$getByHandle('img');
handle.anchorScroll();
};
}
Somewhere else: 别的地方:
$scope.scrollToAnchorWithinCurrentPage('foo');
HTML: HTML:
<img src="img/list/pfeil-badge.png" ng-hide="!unlocked" id="foo" ng-if="atStreet" class="pfeil-only-badge" alt="">
The content scrolls to the anchor, but scrolling up again is not possible anymore. 内容滚动到锚点,但是再也无法向上滚动。
When i scroll down the app looks like this: 当我向下滚动时,应用程序如下所示:
So it's possible to overscroll... 因此有可能过度滚动...
Any help much apreciated! 任何帮助倍感赞赏!
解决的办法是我必须将离子含量更改为以下内容:
overflow-scroll="true" has-bouncing="true"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.