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.
In legacy browsers such as IE9, relative links are treated like absolute links in html5mode.
E.g. in Chrome:
The link subdir/ from http://angular-relative-links.richardc.net/ goes to http://angular-relative-links.richardc.net/subdir/ and,
the link subdir/ from http://angular-relative-links.richardc.net/subdir/ goes to http://angular-relative-links.richardc.net/subdir/subdir/ ...
As expected.
However In IE9:
The link subdir/ from http://angular-relative-links.richardc.net/ goes to http://angular-relative-links.richardc.net/#/subdir/ but,
the link subdir/ from http://angular-relative-links.richardc.net/#/subdir/ goes to http://angular-relative-links.richardc.net/#/subdir/, i.e. it stays on the same page.
To test this, you need IE9 (or presumably another legacy browser that does not support history.pushState). You can download a Windows WM with IE9 from Microsoft from here: http://www.modern.ie/en-us/virtualization-tools#downloads
Also in Chrome in html5mode hash links are treated as regular links when $location.path() is '/'. Click on the #hash on my test page http://angular-relative-links.richardc.net/ to see. When you click on #hash a second time it starts behaving as expected.