[英]anchor scroll with angular/ionic breaks layout and scrolling up is not possible anymore
這是我的代碼:
if($state.current.name == "list") {
$scope.scrollToAnchorWithinCurrentPage = function(anchor) {
$location.hash(anchor);
var handle = $ionicScrollDelegate.$getByHandle('img');
handle.anchorScroll();
};
}
別的地方:
$scope.scrollToAnchorWithinCurrentPage('foo');
HTML:
<img src="img/list/pfeil-badge.png" ng-hide="!unlocked" id="foo" ng-if="atStreet" class="pfeil-only-badge" alt="">
內容滾動到錨點,但是再也無法向上滾動。
當我向下滾動時,應用程序如下所示:
因此有可能過度滾動...
任何幫助倍感贊賞!
解決的辦法是我必須將離子含量更改為以下內容:
overflow-scroll="true" has-bouncing="true"
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.