derickbailey/backbone.marionette — pull request #26 by baalexander (2012-02-16 22:16:18+00:00)
Title: Supports defining the controller in the router's definition.

Originally, the controller for AppRouter needed to be passed in the constructor.
Now supports providing the router in the definition.

Example:

```javascript
var controller = {
foo: function() {
// ...
}
}

var Router = Backbone.Marionette.AppRouter.extend({
controller: controller
, appRoutes: {
"foo": "foo"
}
});
```

I'm using require.js and each Router and Controller pair are defined in their own files (ex: BookRouter.js would defined a BookController and BookRouter). The uninitialized Router is returned (BookRouter in the example) and another file would call new BookRouter().