Sunday, May 19, 2024
 Popular · Latest · Hot · Upcoming
134
rated 0 times [  139] [ 5]  / answers: 1 / hits: 23446  / 13 Years ago, mon, september 5, 2011, 12:00:00

I'm using backbone for a current project. I was wondering if it's possible to do routing without hashes #, like davis.js does.



Thanks!


More From » backbone.js

 Answers
26

You need to enable pushState



Backbone.history.start({pushState: true})



http://backbonejs.org/#Router



http://backbonejs.org/#History



Edit: As noted in the comments this will only work for browsers that support pushState, browsers that don't will fall back to the hash method. There is no real way around this, you can enable for modern browser and fall back or just use hashes for all browsers.


[#90257] Saturday, September 3, 2011, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
darennevina

Total Points: 422
Total Questions: 128
Total Answers: 105

Location: Comoros
Member since Tue, Mar 14, 2023
1 Year ago
;