This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Docs: Internal hash-links' hrefs on docs.angularjs.org all lead to the docs home page #16608
Closed
1 of 3 tasks
I'm submitting a ...
Current behavior:
Internal hash-links on all doc pages (i.e. ones that are meant to just scroll the user to a section on the same page) are all broken, leading to the docs home page instead of the current one.
This seems to work - clicking on the links scroll to the correct place and the URL updates properly - but that's because Angular.js intercepts the native browser navigation.
This is caused by the
<base>
tag that points to the main page, causing seemingly harmless hash-links like#migrating-from-1-6-to-1-7
to resolve against thedocument.baseURI
instead of the current URL path name.Expected / new behavior:
All the links should work when opened in a new tab.
Minimal reproduction of the problem with instructions:
If you try to open one of the links on a new page, e.g. via Ctrl+click (Windows/Linux) or Cmd+click (macOS) you'll get to the incorrect:
https://docs.angularjs.org/api#migrating-from-1-6-to-1-7
instead of the expected:
https://docs.angularjs.org/guide/migration#migrating-from-1-6-to-1-7
See e.g. how at https://docs.angularjs.org/guide/migration the "Migrating from 1.6 to 1.7" link behaves.
AngularJS version: N/A
The docs for older AngularJS versions don't suffer this issue, compare a correct:
https://code.angularjs.org/1.6.6/docs/guide/migration
with a broken:
https://code.angularjs.org/1.6.7/docs/guide/migration
Browser: all
Anything else:
The text was updated successfully, but these errors were encountered: