title: AngularJS: ng-repeat track by $index inside nested loops
body: <p>I need a second $index for my nested ng-repeat loop. How and where should I put it? </p>
  
  <p><a href="https://docs.angularjs.org/api/ng/directive/ngRepeat">AngularJS site</a> says </p>
  
  <blockquote>
    <p>Creating aliases for these properties is possible with ngInit. This
    may be useful when, for instance, nesting ngRepeats.</p>
  </blockquote>
  
  <pre><code>&lt;div ng-repeat="person in persons track by $index"&gt;
      &lt;div ng-repeat="something in array track by $index2"&gt; &lt;!-- where to init this and how to manage it?--&gt;
  </code></pre>
  
  <p>If I use $index again, it seems to work but I am not sure this is the right thing?
  I am sure there is an easy and correct way of doing it, I just wasn't able to find an example.</p>
  
  <p>Thanks</p>