Created
October 11, 2012 03:50
-
-
Save asalant/3870050 to your computer and use it in GitHub Desktop.
Ubiquitous JS example: Browserify entry point
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
| User = require '../shared/models/user' | |
| UserEditView = require './views/user_edit_view' | |
| $ -> | |
| router = new Backbone.Router { | |
| 'users/:userId/edit': 'user-edit' | |
| } | |
| router.on 'route:user-edit', (userId) -> | |
| user = new User(_id: userId) | |
| user.fetch success: -> | |
| router.show new UserEditView(user) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment