Skip to content

Commit 8d28230

Browse files
committed
feat($anchorScroll) Allow $anchorScroll to have a numeric input
Ref angular#14680 Before the change : <div id="7"> $anchorScroll(7); Does not work After the change : <div id="7"> $anchorScroll(7); works
1 parent 9b05fbc commit 8d28230

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ng/anchorScroll.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,8 @@ function $AnchorScrollProvider() {
239239

240240
function scroll(hash) {
241241
//Allow hash to be a number
242-
if(isNumber(hash)) hash = hash.toString();
243-
242+
if (isNumber(hash)) hash = hash.toString();
243+
244244
hash = isString(hash) ? hash : $location.hash();
245245
var elm;
246246

0 commit comments

Comments
 (0)