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
feat($anchorScroll): allow scrolling to a specified element #9596
Closed
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
671bf6b
to
b691f39
Compare
4dd5a20
to
998c61c
Compare
b4f3d67
to
b00921b
Compare
d915061
to
dda4c91
Compare
dda4c91
to
6b6fef7
Compare
Small and safe little feature, with docs and tests - what's not to love about this PR (even Travis likes it) ;) |
6b99562
to
14c5216
Compare
CLAs look good, thanks! |
f9fa6dc
to
ef451f7
Compare
dacfd0a
to
ab050c4
Compare
ab050c4
to
2068e44
Compare
2068e44
to
ecba1e5
Compare
ecba1e5
to
04cd27f
Compare
04cd27f
to
6b2549d
Compare
return function($anchorScroll) { | ||
$anchorScroll(); | ||
$anchorScroll.apply(null, args); |
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.
Why does this need to be so complicated? Could it not simply be:
function callAnchorScroll(hash) {
return function($anchorScroll) {
$anchorScroll(hash);
};
}
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.
Hm...why indeed ?
I would make the commit title: |
If you could deal with the small comments above then LGTM |
3b9232a
to
d741c09
Compare
$location.hash()
LGTM |
Add an optional argument to `$anchorScroll()` to enable scrolling to an anchor element different than that related to the current value of `$location.hash()`. If the argument is omitted or is not a string, the value of `$location.hash()` will be used instead. Closes angular#4568
d741c09
to
55f44b7
Compare
netman92
pushed a commit
to netman92/angular.js
that referenced
this pull request
Aug 8, 2015
Add an optional argument to `$anchorScroll()` to enable scrolling to an anchor element different than that related to the current value of `$location.hash()`. If the argument is omitted or is not a string, the value of `$location.hash()` will be used instead. Closes angular#4568 Closes angular#9596
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.
Add an optional argument to
$anchorScroll()
to enable scrolling to an anchor element different than that related to the current value of$location.hash()
. If the argument is omitted, the value of$location.hash()
will be used instead.Closes #4568