【发布时间】:2015-11-02 23:11:36
【问题描述】:
我正在使用 ionic 框架的简单列表视图,它在某些设备上运行良好,而在某些设备上它隐藏了滚动条。用户在某些设备中根本无法滚动。许多用户都面临同样的问题,他们已经讨论过here。
重现同样的问题
使用
创建应用程序ionic start scrollTest sidemenu
-将“PlaylistsCtrl”控制器修改为:
.controller('PlaylistsCtrl', function($scope) {
$scope.playlists = [
{ title: 'Reggae', id: 1 },
{ title: 'Chill', id: 2 },
{ title: 'Dubstep', id: 3 },
{ title: 'Indie', id: 4 },
{ title: 'Rap', id: 5 },
{ title: 'Cowbell', id: 6 },
{ title: 'Breaks', id: 7 },
{ title: 'Jungle', id: 8 },
{ title: 'Drum & Bass', id: 9 },
{ title: 'Classics', id: 10 },
{ title: 'Blah', id: 11 },
{ title: 'Foo', id: 12 },
{ title: 'Bar', id: 13 },
{ title: 'House', id: 14 },
{ title: 'Trance', id: 15 },
{ title: 'EDM', id: 15 },
{ title: 'Country', id: 16 },
{ title: 'Rock', id: 17 }
];
})
-在 playlists.html 中设置溢出滚动为真:
<ion-content class="has-header" overflow-scroll="true">...
-在设备上启动应用程序:
ionic run android
...一旦启动,初始化视图(播放列表)就不会滚动...
任何人都可以帮助我解决这个问题,这会很棒,因为如果不解决这个错误,我们就无法启动应用程序。
【问题讨论】: