angular-ui/bootstrap — pull request #2762 by KyleMit (2014-09-30 02:57:11+00:00)
Title: Fix initial load of fragment URLs

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:

![404](http://i.imgur.com/DUuYF5i.png)

The `location.replace()` method should include the anchor tag and the element ID as can be seen in [smoothscroll-angular-custom.js](https://github.com/angular-ui/bootstrap/blob/gh-pages/assets/smoothscroll-angular-custom.js#L79)

This 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-pages` should work:

http://kylemitofsky.com/angular-bootstrap/#datepicker
http://kylemitofsky.com/angular-bootstrap/#/datepicker