Fix initial load of fragment URLs#2762
Fix initial load of fragment URLs#2762KyleMit wants to merge 1 commit intoangular-ui:gh-pagesfrom KyleMit:gh-pages
Conversation
|
Just need to check whether this work for legacy browsers such as IE9. |
|
I just tested on IE8/9/10/11 & FF & Chrome smoothscroll-angular-custom.js appears to be broken on IE8 & IE9. If you load the regular page and try to navigate to an anchor tag, nothing will happen. If you load a page with a fragment uri in either of these browsers, nothing will load. This is true for the current production site and remains true for my pull request. The pull request addresses IE10, IE11, FF, and Chrome In all of these browsers smooth scrolling works, but the application breaks when an acnhor URL is initially navigated to because |
|
Any word on this? It would be a really nice fix for linking to the documentation. |
|
Thank you! Just for future reference, such fixes should go to the master branch as the gh-pages branch is generated from the code in the master branch. |
Here is an example of a fragment URI that exists in the documentation:
http://angular-ui.github.io/bootstrap/#datepicker
Within the documentation page, this gets picked up by smoothscroll-angular-custom.js and converted to this:
http://angular-ui.github.io/bootstrap/#/datepicker
Unfortunately, when you try to navigate fresh to either of those urls, the initialize code in app.js picks up the hash location and doesn't properly replace the element id, resulting in the following 404 page:
The
location.replace()method should include the anchor tag and the element ID as can be seen in smoothscroll-angular-custom.jsThis will produce the proper result when navigating from elsewhere on the web and fix a lot of broken links.
Both of the following on my forked version of
gh-pagesshould work:http://kylemitofsky.com/angular-bootstrap/#datepicker
http://kylemitofsky.com/angular-bootstrap/#/datepicker