olivernn / davis.js

RESTful degradable JavaScript routing using pushState
http://davisjs.com
532 stars 58 forks source link

Hash routing #9

Closed jbaudanza closed 13 years ago

jbaudanza commented 13 years ago

This pull request references issue #7

The default prefix is now an empty string. I also found a few places that I hardcoded a "!", so that was a good exercise.

The pollerInterval is now configurable and defaults to 100ms.

The location normalization is definitely ugly business. I wanted to expose it in some way to the API consumer, otherwise they would end up with URLs that looks like http://www.example.com/one_thing#/another_thing. I wanted this extension to just make all the ugliness go away (as much as possible). For now, I've set the default to false.