ion-reorder-button
隶属于ionItem

用法

<ion-list ng-controller="MyCtrl">
  <ion-item ng-repeat="item in items"><ion-reorder-button class="ion-navicon"
                        on-reorder="moveItem(item, $fromIndex, $toIndex)">
    </ion-reorder>
  </ion-item>
</ion-list>
function MyCtrl($scope) {
  $scope.items = [1, 2, 3, 4];
  $scope.moveItem = function(item, fromIndex, toIndex) {
    //把该项移动到数组中
    $scope.items.splice(fromIndex, 1);
    $scope.items.splice(toIndex, 0, item);
  };
}

API

属性 类型 详情
on-reorder
(可选)
表达式

当一项被重新排序时调用表达式。给定参数:$fromIndex, $toIndex。