0

I need to know how to make an anchorScroll to differents ID inside a ng-repeat menu.

<li data-ng-repeat="page in pages">
   <a href="{{href}}">{{ page.title }}</a>
</li>

<div id="1">One</div>
<div id="2">Two</div>

Thanks!

  • Is the question to scroll to those divs though, or something else? If it is those divs, the premise of the question is incorrect - they are not actually part of the li ng-repeat. – user3043124 Jan 15 '14 at 13:20
  • You can see this fiddle http://jsfiddle.net/grevelles/MY6JL/ – user3197950 Jan 15 '14 at 13:24
  • Your fiddle is broken. – Rob Jan 15 '14 at 15:30