Skip to content

Instantly share code, notes, and snippets.

@gerrymanoim
Created August 17, 2011 15:40
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 gerrymanoim/1151810 to your computer and use it in GitHub Desktop.
Save gerrymanoim/1151810 to your computer and use it in GitHub Desktop.
Same Routing
(function(routes) {
routes.mapRoute(
"Test", // Name.
"foo/bar/{controller}/{action}/{p1}/{p3}/{p2}", // Path.
{ controller: "Page", action: "Index", p1: "default1", p2: "default2", p3: "default3" } // Defaults.
);
routes.mapRoute(
"Default", // Name.
"{controller}/{action}/{id}", // Path.
{controller: "Page", action: "Index", id: ""} // Defaults.
);
})(MyApp.routes);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment