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.
Do you want to request a feature or report a bug?
Request a feature
What is the current behavior?
Now $anchorScroll expects the parameter to be a string. If a number is passed, it won't work. This can lead to a confusing situation like: <div id="7"> $anchorScroll(7); won't work
What is the expected behavior?
If a number is provided, cast it
What is the motivation / use case for changing the behavior?
Having html elements with a numeric id
Which versions of Angular, and which browser / OS are affected by this issue? Did this work in previous versions of Angular? Please also test with the latest stable and snapshot (https://code.angularjs.org/snapshot/) versions.
Latest version
Other information (e.g. stacktraces, related issues, suggestions how to fix)
In angular.js/src/ng/anchorScroll.js line 240 change it to:
hash = hash ? String(hash) : $location.hash();