I have the following files. This is code in node-list.html
<tbody sv-node-list-item ng-repeat="item in items" />
And this is code in node-list-item.html.
<tr><td>{{$index}}</td></tr>
Basically node-list-item is rendered for each iteration of the ng-repeat of the node-list.html file. I need to access the index of the item from the parent i.e. node-list.html in node-list-item.html I have been researching this for quiet some time but am not able to do so. Please help. I am using angular1 i.e. angularjs. This is the directive code in node-list-item.js
function directive() { return { templateUrl: "partials/node-list-item.html" };}
module.directive("svNodeListItem",[ directive ]);