【问题标题】:ion infinite scroll doesn't work with ion segment离子无限滚动不适用于离子段
【发布时间】:2017-04-11 12:35:00
【问题描述】:

我正在尝试将 ion-infinite-scroll 与 ion-segment 一起使用,它在主 ion-segment 加载但我在 ion-infinite-scroll 和 ion-segment 停止显示数据。 帮助, 谢谢。

【问题讨论】:

    标签: ionic2


    【解决方案1】:

    如果嵌套在 ngSwitch(或 ngIf)下,ion-infinite-scroll 不适用于 ion-segment。如果认为它会由 ionic 团队修复,但同时我使用 ngClass 作为解决方法:

    <div [ngClass]="{'hidden': segment !== 'mySegment' }">
     content
    </div>
    
    .hidden {
      display: none;
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-04-07
      • 2016-04-08
      • 2016-03-08
      • 1970-01-01
      相关资源
      最近更新 更多