离子收集重复滚动不起作用

时间:2015-08-04 07:38:18

标签: angularjs ionic-framework ionic

我正在尝试显示带有集合重复的列表,它确实输出了列表,但它不可滚动。任何想法是我做错了什么?

那是我的代码;

<div class="list" >
    <div class="form-item"
         ng-class="{'form-item--child': airport.isChild}"
         collection-repeat="airport in airports track by airport.id"
         collection-item-width="1080"
         collection-item-height="200" ng-show="airportName && airportName.length > 0">
        <ion-radio ng-model="obj.value" ng-value="airport.value" on-tap="selectAirport(airport)">{{ airport.label }}<i class="icon-select"></i></ion-radio>
    </div>

    <div class="form-item" collection-repeat="airport in favorites track by airport.id"
         collection-item-width="1080" collection-item-height="200"  ng-hide="airportName.length > 0">
        <ion-radio ng-model="obj.value" ng-value="airport.value" on-tap="selectAirport(airport)">{{ airport.label }}<i class="icon-select"></i></ion-radio>
    </div>
</div>

1 个答案:

答案 0 :(得分:6)

确保离子js控制你的卷轴:overflow-scroll="false"

并将您的项目包装在ion-list

<ion-content class="has-header" overflow-scroll="false">
     <ion-list>
           <ion-item
               class="form-item" 
               collection-repeat="airport in favorites track by airport.id"
               collection-item-width="1080" collection-item-height="200"  ng-hide="airportName.length > 0">
               <ion-radio ng-model="obj.value" ng-value="airport.value" on-tap="selectAirport(airport)">{{ airport.label }}<i class="icon-select"></i></ion-radio>
           </ion-item>
    </ion-list>
</ion-content>