ionic AngularJS-设定ion-scroll div 动态高度

来源:互联网 发布:用户数据加密存储模块 编辑:程序博客网 时间:2024/05/19 22:47

在ion_scroll中,必须设定固定的高度后才能实现Y方向的滚动,但是对于不同高度的窗口,需要根据实际情况进行设定其高度

设定该ion_scroll的ng_style属性,

ng-style="grid_height"
js中设定动态的高度,页面的高度-header-foot及其他固定的高度
$scope.grid_height={height:''+document.getElementById("html").offsetHeight-340+'px'};

0 0