I get a trunk router to work
App.Router = Backbone.Router.extend({
routes: {
"todo": "todo"
},
todo: function() {
alert(1);
}
});
Backbone.history.start();
This works well when I get url: domain: port / # / todo
I want this to work without # in the url, I tried setting the pushState parameter as indicated in the docs.
Backbone.history.start({pushState: true});
It just redirects # url to non-hashed
domain: port / # / todo (redirected to ==>) domain: port / todo
But when I visit this URL directly
domain: port / TODO
it does not work: "Unable to get / todo".
Is there any way I can get this URL to work without # in it?
source
share