X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/7a654f8d43fdb43d78b63d90528bed6e86b608cc..3789b528d8dd8aad4558e38e22d775bcab1cbd36:/jsbuilder/src/generators/app/files/app/routes.js diff --git a/jsbuilder/src/generators/app/files/app/routes.js b/jsbuilder/src/generators/app/files/app/routes.js new file mode 100644 index 00000000..a2e621ce --- /dev/null +++ b/jsbuilder/src/generators/app/files/app/routes.js @@ -0,0 +1,18 @@ +/** + * The Router maps local urls to controller and action pairs. This is used primarily + * for providing history support without reloading the page. Example usage: + * + * Connects http://myapp.com/#home to the index controller's overview action + * map.connect("home", {controller: 'index', action: 'overview'}); + * + * Connects urls like "images/myImage.jpg" to the images controller's show action, passing + * "myImage.jpg" as the "url" property of the options object each controller action receives + * map.connect("images/:url", {controller: 'images', action: 'show'}); + */ +Ext.Router.draw(function(map) { + + + //These are default fallback routes and can be removed if not needed + map.connect(':controller/:action'); + map.connect(':controller/:action/:id'); +}); \ No newline at end of file