Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

docs: autoscroll to anchor does not work on /api/ng #4703

Closed
jamesdaily opened this issue Oct 29, 2013 · 3 comments
Closed

docs: autoscroll to anchor does not work on /api/ng #4703

jamesdaily opened this issue Oct 29, 2013 · 3 comments

Comments

@jamesdaily
Copy link
Contributor

When visiting http://docs.angularjs.org/api/ng#filter, the browser does not autoscroll the page to the anchor.

This functionality does work on other pages, such as http://docs.angularjs.org/api/angular.Module#methods_config (that anchor link causes the page to scroll to the anchor as expected.)

Note that if you first visit http://docs.angularjs.org/api/ng, and then append #filter to the URL and press enter, the page then scrolls to that anchor. Perhaps this bug has to do with how the content on the ng page is loaded as compared to other pages.

Possibly related issues (hopefully this one isn't a dupe): #4262 #2639

@petebacondarwin
Copy link
Member

This should be fixed by this: #4758

@IgorMinar
Copy link
Contributor

it's not fixed yet because ng-include doesn't wait for it's nested templates to instantiate before calling autoscroll.

we can't fix this in the framework now (we should in the future), so we should just fix the directive that generates the table of contents to call autoscroll on its own when its template arrives.

@ghost ghost assigned jeffbcross Nov 6, 2013
@IgorMinar
Copy link
Contributor

jeffbcross added a commit to jeffbcross/angular.js that referenced this issue Nov 6, 2013
When navigating to URLs such as
docs.angularjs.org/api/ng#filter, the browser
was not able to navigate to the named anchor,
"filter," because the anchor did not yet exist
in the DOM.

This fix uses the $anchorScroll service
to automatically scroll to the right place when
the content has been added to the page.

Fixes angular#4703
jamesdaily pushed a commit to jamesdaily/angular.js that referenced this issue Jan 27, 2014
When navigating to URLs such as
docs.angularjs.org/api/ng#filter, the browser
was not able to navigate to the named anchor,
"filter," because the anchor did not yet exist
in the DOM.

This fix uses the $anchorScroll service
to automatically scroll to the right place when
the content has been added to the page.

Fixes angular#4703
jamesdaily pushed a commit to jamesdaily/angular.js that referenced this issue Jan 27, 2014
When navigating to URLs such as
docs.angularjs.org/api/ng#filter, the browser
was not able to navigate to the named anchor,
"filter," because the anchor did not yet exist
in the DOM.

This fix uses the $anchorScroll service
to automatically scroll to the right place when
the content has been added to the page.

Fixes angular#4703
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants