I have a function **getData** defined in main controller that I would like to use in my directive. I tried including the function in scope but seems I am still missing something or doing it wrong.

[plunker link to my testcase](http://plnkr.co/edit/QTin1ozCAgyuoyTrQ4Y0?p=preview)

```
var app = angular.module('plunker', []);

app.directive("position", function(){
   return {
       restrict:'A',
       template: "<tr><td ng-repeat='(key,value) in position'>{{getData(key,value,$index)}}</td></tr>",
       replace: false,
       scope: {
         position: '=',
         getData: '&'
       }
   };
});

app.controller('MainCtrl', function($scope) {
   $scope.name = 'World';
   $scope.positions = [{ Name: "Quarterback", Code: "QB" },
                       { Name: "Wide Receiver", Code: "WR" }
                      ]; 
   $scope.getData=function(key , value,index){
       return '|' + value + '|';
   }
});

```