title: How to pass multiple arguments to Ionic reorder directive?
body: <p>I'm basing the issue on the following codepen: <a href="http://codepen.io/ionic/pen/JsHjf" rel="nofollow noreferrer">http://codepen.io/ionic/pen/JsHjf</a></p>
  
  <p>It uses: <code>&lt;ion-reorder-button class="ion-navicon" on-reoder="moveItem(item, fromIndex, toIndex)"&gt;&lt;/ion-reorder-button&gt;</code> and it is working just fine.</p>
  
  <p>I want to move whole <code>&lt;ion-item&gt;</code> into a directive. Here is my plnkr: <a href="http://plnkr.co/edit/w61yqfuCypliugToUD3E?p=preview" rel="nofollow noreferrer">http://plnkr.co/edit/w61yqfuCypliugToUD3E?p=preview</a> and some essential code parts:</p>
  
  <pre><code>directive("myitem", function() {
    return {
      restrict : "E",
      scope : {
        item : "=",
        onItemDelete : "&amp;",
        moveItem : "&amp;"
      },
      templateUrl : "MyItemTemplate"
    }
  })
  </code></pre>
  
  <p></p>
  
  <pre><code>&lt;ion-item&gt;
    {{ item.id }}
    &lt;ion-delete-button class="ion-minus-circled" ng-click="onItemDelete({'item': item})"&gt;&lt;/ion-delete-button&gt;
    &lt;ion-reorder-button class="ion-navicon" on-reorder="moveItem({'item' : item, 'fromIndex' : fromIndex, 'toIndex' : toIndex})"&gt;&lt;/ion-reorder-button&gt;
  &lt;/ion-item&gt;
  </code></pre>
  
  <p></p>
  
  <p>I know how to pass multiple parameters thanks to that question: <a href="https://stackoverflow.com/questions/18973507/angularjs-directive-binding-a-function-with-multiple-arguments">AngularJS directive binding a function with multiple arguments</a></p>
  
  <p>However the <strong>fromIndex</strong> and <strong>toIndex</strong> are not propagated</p>
  
  <pre><code>  $scope.moveItem = function(item, fromIndex, toIndex) {
      console.log("moveItem: ", item, fromIndex, toIndex);
      console.log("unfortunately, the fromIndex and toIndex are undefined");
      $scope.items.splice(fromIndex, 1);
      $scope.items.splice(toIndex, 0, item);
    };
  </code></pre>
  
  <hr>
  
  <p>I tried looking into the source, moving up to the call stack but I cannot spot any obvious blunders there.</p>
  
  <p><img src="https://i.stack.imgur.com/9LjYY.png" alt="enter image description here"></p>
  
  <hr>
  
  <p>So yes, I would really like to take benefit of reorder-able list while keeping it into a separate directive.</p>