Last active
December 17, 2015 16:49
-
-
Save monzou/5641088 to your computer and use it in GitHub Desktop.
My little Backbone.js framework's Router sample.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class UsersRouter extends ResourceRouter | |
path: "users" | |
layout: "#contents" | |
routes: | |
":id": "show" | |
show: (id) -> | |
new User({id: id}).fetch success: (model) => | |
@layoutView ShowView, | |
model: model | |
bundles: | |
users: UsersBundle |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment