{"action":"created","issue":{"url":"https://api.github.com/repos/oblador/angular-scroll/issues/154","labels_url":"https://api.github.com/repos/oblador/angular-scroll/issues/154/labels{/name}","comments_url":"https://api.github.com/repos/oblador/angular-scroll/issues/154/comments","events_url":"https://api.github.com/repos/oblador/angular-scroll/issues/154/events","html_url":"https://github.com/oblador/angular-scroll/issues/154","id":112741487,"number":154,"title":"du-scrollspy not working with dynamic content","user":{"login":"balasivagnanam","id":4233785,"avatar_url":"https://avatars.githubusercontent.com/u/4233785?v=3","gravatar_id":"","url":"https://api.github.com/users/balasivagnanam","html_url":"https://github.com/balasivagnanam","followers_url":"https://api.github.com/users/balasivagnanam/followers","following_url":"https://api.github.com/users/balasivagnanam/following{/other_user}","gists_url":"https://api.github.com/users/balasivagnanam/gists{/gist_id}","starred_url":"https://api.github.com/users/balasivagnanam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/balasivagnanam/subscriptions","organizations_url":"https://api.github.com/users/balasivagnanam/orgs","repos_url":"https://api.github.com/users/balasivagnanam/repos","events_url":"https://api.github.com/users/balasivagnanam/events{/privacy}","received_events_url":"https://api.github.com/users/balasivagnanam/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-10-22T06:46:39Z","updated_at":"2015-12-03T16:30:43Z","closed_at":null,"body":"Thanks for this awesome plugin.\r\n\r\nI am trying to use this with a list of navigation links and goes to a list of div with ids dynamically populated.\r\n\r\nThis is my code below,\r\n```html\r\n<div class=\"row\" id=\"pagewrap\">\r\n      <div class=\"col-md-3 xs-hidden sm-hidden\">\r\n        <ul class=\"components-left-bar\" id=\"sidebar\">\r\n          <li ng-repeat=\"section in userneeds.sections\" du-scrollspy=\"{{section.id}}\"><a href=\"#{{section.id}}\" du-smooth-scroll du-scrollspy>{{section.name}}</a></li>\r\n        </ul>\r\n      </div>\r\n      <div class=\"col-md-9 col-sm-12 col-xs-12\">\r\n          <div class=\"component-sections\" ng-repeat=\"section in userneeds.sections\">\r\n            <h3 class=\"component-section-title\" id=\"{{section.id}}\">{{section.name}}</h3>\r\n            <div class=\"component-section\">\r\n              <div class=\"component-section-inner\" ng-repeat=\"innersection in section.innersections\">\r\n                <div class=\"component-general\">\r\n                    <h3 class=\"section-title\">{{innersection.header}}</h3>\r\n                    <p>{{innersection.description}}</p>\r\n                    <ul class=\"ext-links\" ng-repeat=\"extlink in innersection.links\">\r\n                      <li><a href={{extlink.linkPath}}>{{extlink.linkContent}}<i class=\"fa fa-external-link\"></i></a></li>\r\n                    </ul>\r\n                </div>\r\n              </div>\r\n              </div>\r\n              </div>\r\n            </div>\r\n          </div>\r\n```\r\n\r\nI tried various combinations like\r\n```html\r\n<a href=\"#{{section.id}}\" du-smooth-scroll  du-scrollspy=\"{{section.id}}\">{{section.name}}</a>\r\n<a href=\"#{{section.id}}\" du-smooth-scroll  du-scrollspy>{{section.name}}</a>\r\n<li ng-repeat=\"section in userneeds.sections\" du-scrollspy=\"{{section.id}}\"><a href=\"#{{section.id}}\" du-smooth-scroll du-scrollspy>{{section.name}}</a></li>\r\n```\r\nbut no luck.\r\n\r\nI found this similar plunker and I see it not working. \r\nNot sure what is going wrong here.\r\n\r\nhttp://plnkr.co/edit/RlNCNvOQAc1hmoCPlTTo?p=preview\r\n"},"comment":{"url":"https://api.github.com/repos/oblador/angular-scroll/issues/comments/161706757","html_url":"https://github.com/oblador/angular-scroll/issues/154#issuecomment-161706757","issue_url":"https://api.github.com/repos/oblador/angular-scroll/issues/154","id":161706757,"user":{"login":"homerjam","id":1055769,"avatar_url":"https://avatars.githubusercontent.com/u/1055769?v=3","gravatar_id":"","url":"https://api.github.com/users/homerjam","html_url":"https://github.com/homerjam","followers_url":"https://api.github.com/users/homerjam/followers","following_url":"https://api.github.com/users/homerjam/following{/other_user}","gists_url":"https://api.github.com/users/homerjam/gists{/gist_id}","starred_url":"https://api.github.com/users/homerjam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/homerjam/subscriptions","organizations_url":"https://api.github.com/users/homerjam/orgs","repos_url":"https://api.github.com/users/homerjam/repos","events_url":"https://api.github.com/users/homerjam/events{/privacy}","received_events_url":"https://api.github.com/users/homerjam/received_events","type":"User","site_admin":false},"created_at":"2015-12-03T16:30:43Z","updated_at":"2015-12-03T16:30:43Z","body":"In case this helps I had a similar issue but realised that due to the way I had my ui-views and components setup the component that contained the scrollspy was being initialised twice. The weird thing was that although the view was replaced the scrollspy directive only ran the first time - it therefore referenced a different element (one that had been replaced)."}}