本机滚动不适用于离子

native scrolling not working on ionic

我正在尝试像这样使用本机滚动:

angular.module('MyApp').config(function ($translateProvider,$ionicConfigProvider) {

    $translateProvider.preferredLanguage('en');
    $translateProvider.useStaticFilesLoader({
        prefix: 'languages/',
        suffix: '.json'
    });
    if(!ionic.Platform.isIOS())$ionicConfigProvider.scrolling.jsScrolling(false);
})

我的滚动完全停止工作的问题非常类似于:code pen

我的模板:

 <div class="list">
        <a ng-repeat="item in items" class="item card"
           href="#/tab/details/{{item.queId}}">
                <div class="row">....

感谢您的帮助!

查看后发现问题只发生在 chrome.....

你的 codepen 没有这一行也能正常滚动:

if(!ionic.Platform.isIOS())$ionicConfigProvider.scrolling.jsScrolling(false);

为什么要使用此代码在非 iOS 平台上禁用滚动?

原生滚动仅适用于 Android 平台。

您可以在最近的一篇博文中阅读更多相关信息 here and in the forum here

您使用的语法没问题:

if (!ionic.Platform.isIOS()) {
    $ionicConfigProvider.scrolling.jsScrolling(false);
  }

但您只能在 android 设备上进行测试。