I am new to Backbone.js, still learning it and 1 problem I have run into is a lot of resources online are outdated and things have changed in Backbone.js since the time the resources were created.
What I am confused about is I have seen some tutorials that have nice clean urls like this
domain/useer/add
but more often I am seeing domain/#useer/add
So my question is, does Backbone enable you to do the URL's like this domain/useer/add
without the # or does that require another library?
I am new to Backbone.js, still learning it and 1 problem I have run into is a lot of resources online are outdated and things have changed in Backbone.js since the time the resources were created.
What I am confused about is I have seen some tutorials that have nice clean urls like this
domain./useer/add
but more often I am seeing domain./#useer/add
So my question is, does Backbone enable you to do the URL's like this domain./useer/add
without the # or does that require another library?
1 Answer
Reset to default 8you can set pushState = true like this.
Backbone.history.start({ pushState: true })
take a look at this link for more details. http://artsy.github.io/blog/2012/06/25/replacing-hashbang-routes-with-pushstate/