jessebeach/boxes — pull request #1 by lmjabreu (2012-05-27 12:41:17+00:00)
Title: bug fix, subrouter example, minor tweaks to the app and subrouter code

Hey!

Changed a few things in the main.js, made it just call the navigate method and let the example module handle the rendering.

There was a typo in main.js, Example.Views.Tutorial() instead of Example.Views.Base(), I chose to use the latter in main.js.

Added a subrouter example, just a link in the Example Base view that points to example/subroute and vice-versa ( html is modified by the subrouter route handler to point back to /example ).

Made a few changes to subrouter.js, nothing special, just making the style consistent and applying some good practices from idiomatic.js ( named functions, consistent quotes, safe comparisons, spacing ).

I also noticed the routing has a few issues when navigating directly to a subroute, somewhere along the code the options property of the Backbone.History isn't populated and the code fails when trying to access this.options.root, noticed there's already an issue in geekdave's repo.

Cheerio!