backbone.marionette.subrouter
backbone.marionette.subrouter copied to clipboard
Unclear example
The example only shows how to instantiate a subrouter. How multiple subrouters can be bundled together is unclear.
I didn't find any vote up button sorry )) Can you make a simple example like single-page application (with require.js) using Subrouter. I am not sure I am doing all stuff wrong but I get exception when creating subrouter like:
Uncaught TypeError: Cannot read property 'visit' of undefined backbone.marionette.min.js:20
e.AppRouter.b.Router.extend._addAppRoute backbone.marionette.min.js:20
(anonymous function) backbone.marionette.min.js:20
.each..forEach underscore.js:79
e.AppRouter.b.Router.extend.processAppRoutes backbone.marionette.min.js:20
e.AppRouter.b.Router.extend.constructor backbone.marionette.min.js:20
Marionette.SubRouter.Marionette.AppRouter.extend.constructor backbone.marionette.subrouter.js:65
child backbone.js:1566
up
:+1:
I asked myself same question so put together jsbin example based on readme one. The only difference I had to do is put controller above the router. Other than that everything is working as expected.