You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
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
The text was updated successfully, but these errors were encountered:
This resolves an issue where the contents of an `ng-include` also contain an ng-include with autoscroll, like this `<div ng-repeat=".." ng-include=".." autoscroll="">`.
In issue angular#2637 the element to scroll to by using `#some-anchor-name` in the url, e.g. `<a name="some-anchor-name"></a>`, is not present in the dom by the time `$anchorScroll()` is called from the ngIncludeDirective.
I have a problem with autoscroll with
ng-repeat
andng-include
. I have this in a route template:And then in the partial template
Then typing e.g.
http://myhost/someurl#24
to go to the element with id24
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 thatelement.getElementById
in thescroll
function in the$AnchorScrollProvider
returnsnull
. 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
The text was updated successfully, but these errors were encountered: