Permalink
Browse files

Example of attaching a sub router defined in another module.

  • Loading branch information...
1 parent fc17d0c commit e91649a72eadcafde1db5c95637ddc6eb08f5f21 @revgum revgum committed Jan 18, 2012
Showing with 6 additions and 1 deletion.
  1. +6 −1 app/index.js
View
@@ -63,7 +63,12 @@ jQuery(function($) {
"": "index",
":hash": "index"
},
-
+ initialize: function(){
+ // If you have sub routers defined in additional modules, you can do attach them here.
+ // This enables navigation such as 'app.routers.OtherRouter.navigate'
+ //
+ // this.OtherRouter = new Other.Router();
+ },
index: function(hash) {
var route = this;
var tutorial = new Example.Views.Tutorial();

0 comments on commit e91649a

Please sign in to comment.