Sai*_*idh 3 angularjs ionic-framework
我们通过设置$location.hash(id)和使用离子应用程序中的scrollTo功能$anchorScroll().滚动到底部工作正常,但是一旦页面使用$anchorScroll和滚动到某个位置,我们就无法向上滚动页面$location.hash().
在codepen中清楚地看到问题.单击" 到底部"按钮并尝试向上滚动.
请提供解决此滚动问题的解决方案.
在"ion-content"div上添加overflow-scroll ="true"
<ion-content overflow-scroll="true">
Run Code Online (Sandbox Code Playgroud)
然后在你的控制器中:
$scope.scrollTo = function(id) {
$location.hash(id);
$ionicScrollDelegate.anchorScroll();
};
Run Code Online (Sandbox Code Playgroud)
有关此Ionic Framework中此问题的更多信息,请访问:http: //forum.ionicframework.com/t/content-stuck-after-anchorscroll/776
| 归档时间: |
|
| 查看次数: |
2816 次 |
| 最近记录: |