title: angularjs anchor in iterator (anchorscroll, ng-repeat,loop)
body: <p>for example, </p>
  
  <pre><code>&lt;div ng-repeat="item in items"&gt;
     &lt;p&gt;item.title&lt;/p&gt;
      ...
      ...
      ...
     &lt;p&gt;item.up&lt;/p&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>As i know ,anchor scroll need to specify an id for the anchor, but how can i do the anchor scroll without id, The situation is there's another loop wrap this item repeat. and i can't specify an id like</p>
  
  <pre><code>&lt;div ng-repeat="item in items"&gt;
     &lt;p id="anchor{{$index}}"&gt;item.title&lt;/p&gt;
      ...
      ...
      ...
     &lt;p&gt;item.up&lt;/p&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>So if the code is like below, there will be multi id="anchor{{$index}}"</p>
  
  <pre><code> &lt;div ng-repeat="parent in parents"&gt;
      &lt;div ng-repeat="item in items"&gt;
         &lt;p id="anchor{{$index}}"&gt;item.title&lt;/p&gt;
        ........
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>And i don't want to use two indexs to specify the id, or the code will be too complex.</p>
  
  <p>How can i solve it .....Thanks</p>