documentcloud/backbone — Issue #676: pushState:true doesn't match routes correctly.
Author: lawrencepit
Created: 2011-10-17 09:09:20+00:00
State: open

If I start an app with:

Backbone.history.start(pushState: true)

And I point my browser to say:

http://localhost/posts

Then it won't match this route:

route("/posts", "index")

I think all routes always start with a slash.

I see that +getFragment+ strips off the first slash character. I don't understand why?

I could use this:

route("posts", "index")

but then I can't use:

navigate("/posts", true)

which I find rather odd.