visionmedia/page.js — pull request #67 by retrofox (2013-09-06 17:22:06+00:00)
Title: Add handler to links with #hash

Now page-js isn't handling links with #hash string. So if a url has an hash when a hard-refresh is done the current page loses that url.

I've added code to handler this kind of links and also I've added an `hash` example. I've planned this implementation thinking in four kind of links:

1. empty hash: `#` - it won't match with any route
2. only hash: `#the-hash` - it won't match with any route
3. link without hash: `link?name=toto` - it can be matched.
4. link plus hash: `link?name=toto#the-hash` - it can be matched.

For the last case I added the `.hash` property into the context object and cleaned the hash from `.path` and `.querystring` properties.

![](https://i.cloudup.com/WCVm8jH7Aw.png)

I insist ... for the last case the url always can be matched, therefore the callback function binded to the route can be executed.