6
I have an app that uses a ng-repeat to list information. Like this:
HTML
<div ng-controller="listaCtrl">
<div ng-repeat="item in lista" ng-controller="itemCtrl">
<pre>{{item}}</pre>
</div>
</div>
I’m using this example to work on each item on the list, and I need to know the index that ng-repeat contains within my itemCtrl.
Is there any method to get the $index from ng-repeat inside my controller?
Catch the
indexwhen?– DiegoAugusto