Created
August 28, 2012 22:08
-
-
Save hmaurer/3504766 to your computer and use it in GitHub Desktop.
This file contains 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
application = require 'application' | |
AppView = require 'views/app_view' | |
HomeView = require 'views/home_view' | |
App = {Router: {}} | |
class App.Router.Home extends Backbone.Router | |
routes: | |
'': 'home' | |
home: -> | |
alert 'ok' | |
app = new AppView | |
app.section.show(new HomeView) | |
application.body.show(app) | |
module.exports = App.Router.Home | |
# | |
# var application = require('application') | |
# | |
# var AppView = require('views/app_view'); | |
# var HomeView = require('views/home_view'); | |
# | |
# module.exports = Backbone.Router.extend({ | |
# routes: { | |
# '': 'home' | |
# }, | |
# home: function() { | |
# var app = new AppView; | |
# app.section.show(new HomeView); | |
# application.body.show(app) | |
# } | |
# }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment