This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
ngRepeat with ngInclude and autoscroll doesn't seem to work #2637
Closed
Description
I have a problem with autoscroll with ng-repeat
and ng-include
. I have this in a route template:
<div ng-repeat="item in items" ng-include="'partials/template'" autoscroll></div>
And then in the partial template
<div id="{{item.id}}"></div>
Then typing e.g. http://myhost/someurl#24
to go to the element with id 24
does not work. It does seem to work in very simple cases, but it seems to be a problem when I have expressions that might take some time to render. The reason seems to be that element.getElementById
in the scroll
function in the $AnchorScrollProvider
returns null
. Probably because elements from the partial aren't ready in the DOM yet.
I'm running my app with html5mode urls.
It might be related to the challenges described in issue #734
Metadata
Metadata
Assignees
Labels
No labels