If I am using Backbone with pushstate, how should I format my links?
Currently I am doing this:
<a href="task/create">create task</a>
If I use the above format, it actually sends a GET
request to the server, which serves a standard page and backbone correctly identifies that it should go to task/create
, which it does, and shows the view.
But why is it sending a GET
request in the first place? (even though I have set pushstate to true?)
edit: I am using the latest version of Chrome (as of August 2011), so my browser is not a problem, I think.
ok got it answered from here. https://github.com/documentcloud/backbone/issues/456
clicking links are not suppose to be pushstate friendly. one may try to live bind it via jquery and use custom function to create that effect.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With