If I have a directive myDir and I call it within ng-repeat like so
myDir
ng-repeat
Try
Then
app.directive('myDir', function () { return { restrict: 'E', scope: { myindex: '=' }, template:'{{myindex}}', link: function(scope, element, attrs){ scope.myindex = attrs.myindex; console.log('test', scope.myindex) } }; })
Demo: Plunker