Closed ghost closed 8 years ago
Backbone.Router.map(function() { this.route("user_profile", { "path": "/user/:id", "action": function(userId) { /* Render a cool profile page */ } }); this.route("user_profile_edit", { "path": "/user/:id/edit" "before": [ { "path": "/user/$id" } ], "action": function(userId) { /* Render a cool profile edit form based on the original profile page */ } }); });