title: dynamic id ng-repeat
body: <p>I am trying to set a dynamic id to my div within my ng-repeat. Let me show an example.</p>
  
  <pre><code>&lt;div id="$index" ng-repeat="repeat in results.myJsonResults"&gt;
      &lt;div id="$index" ng-click="saveID($index)" ng-repeat="subRepeat in results.myJsonResults.subresults"&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>My problem is, when I click on my child div, I want to get my parent id name, but looks like angular doesn't set the ID properly to the div. Is it possible to set a dynamic ID in this concept?</p>
  
  <p>PS: I tried, in the past, create a counter method on my controller and set an index, but it turns out that angular only recognizes the last value of this ID instead.</p>