Shopify/batman — pull request #462 by hornairs (2012-06-14 20:10:58+00:00)
Title: Hash routing

This makes Batman implement the same behaviour you find the browser: after every dispatch, if there is a `#foo` in the url and an element with id = "foo", it will be scrolled to. Horray!

The changes made to batman:

- Special case the `#` param for dispatcher and route params<->path functionality to stick it at the end instead of putting it as a query parameter
- Add an afterFilter to all controllers which will find an element with that id and scroll to it if it exists and the automatic scroll functionality is enabled, which it is by default.

For browsers with `pushState` support, the urls look like `/admin/2/settings#foo`, and browsers without they will look like `/admin/2#!/settings#foo`, which does in fact work fine in all browsers we target as best I can tell.