Skip to content

Instantly share code, notes, and snippets.

@hmaurer
Created August 28, 2012 22:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hmaurer/3504766 to your computer and use it in GitHub Desktop.
Save hmaurer/3504766 to your computer and use it in GitHub Desktop.
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