This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27.5k
chore(docs/docModuleComponents): allow browser to scroll to anchors #4723
Closed
petebacondarwin
wants to merge
1
commit into
angular:master
from
petebacondarwin:docModuleComponents
Closed
chore(docs/docModuleComponents): allow browser to scroll to anchors #4723
petebacondarwin
wants to merge
1
commit into
angular:master
from
petebacondarwin:docModuleComponents
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This directive, in the documentation application, creates new HTML that contains anchors. If we link to one of these anchors we need to give the browser the opportunity to scroll to them after they have been rendered. An example of such an anchor would be http://docs.angularjs.org/api/ng#directive
link: function() { | ||
// This directive creates new HTML that contains anchors. We need to give the browser the | ||
// opportunity to scroll to them after they have been rendered. | ||
$timeout($anchorScroll); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't the autoscroll on ngInclude sufficient?
the use of $timeout just tells me that we have some ordering issue somewhere and timeout seems to fix it, but if whatever is delaying rendering takes longer than the amount of delay timeout gives us the autoscroll will not work once again.
I've got a feeling it is down to the animations... |
I didn't realise that ngInclude had this autoscroll feature. |
petebacondarwin
added a commit
to petebacondarwin/angular.js
that referenced
this pull request
Nov 2, 2013
We need to wait until animations have added the content to the document before trying to `autoscroll` to anchors that may have been inserted. Fixes angular#4723
jeffbcross
pushed a commit
to jeffbcross/angular.js
that referenced
this pull request
Nov 6, 2013
We need to wait until animations have added the content to the document before trying to `autoscroll` to anchors that may have been inserted. Fixes angular#4723
petebacondarwin
added a commit
that referenced
this pull request
Nov 6, 2013
We need to wait until animations have added the content to the document before trying to `autoscroll` to anchors that may have been inserted. Fixes #4723
jamesdaily
pushed a commit
to jamesdaily/angular.js
that referenced
this pull request
Jan 27, 2014
We need to wait until animations have added the content to the document before trying to `autoscroll` to anchors that may have been inserted. Fixes angular#4723
jamesdaily
pushed a commit
to jamesdaily/angular.js
that referenced
this pull request
Jan 27, 2014
We need to wait until animations have added the content to the document before trying to `autoscroll` to anchors that may have been inserted. Fixes angular#4723
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This directive, in the documentation application, creates new HTML that contains anchors.
If we link to one of these anchors we need to give the browser the opportunity to scroll
to them after they have been rendered.
An example of such an anchor would be http://docs.angularjs.org/api/ng#directive