Skip to content

Instantly share code, notes, and snippets.

@sagar-ganatra
Created November 14, 2012 03:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sagar-ganatra/4070174 to your computer and use it in GitHub Desktop.
Save sagar-ganatra/4070174 to your computer and use it in GitHub Desktop.
Backbone Router example
var AppRouter = Backbone.Router.extend({
routes: {
"": "index",
"welcome": "welcome"
},
index: function() {
loginViewInstance.render();
},
welcome: function() {
welcomeViewInstance.render();
}
});
var appRouterInstance = new AppRouter();
Backbone.history.start();
@forict99
Copy link

Now we have to use Backbone.history.start({pushState:true});

Backbone.JS Training in Chennai

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment