Skip to content Skip to sidebar Skip to footer

Define A Base Url In Backbone.js Router

I want to be able to specify a base url for all my routes for development. Some of the devs have machines setup to work out of subdirectories instead of the application sitting at

Solution 1:

You can use Backbone.history.start like this

Backbone.history.start({
    pushState: true,
    root: "/public/search/"
});

Post a Comment for "Define A Base Url In Backbone.js Router"