Skip to content

Instantly share code, notes, and snippets.

@joshvermaire
Created April 24, 2012 16:45
Show Gist options
  • Save joshvermaire/2481362 to your computer and use it in GitHub Desktop.
Save joshvermaire/2481362 to your computer and use it in GitHub Desktop.
ViewClass = Backbone.View.extend
tagName: 'div'
className: 'class_name'
id: 'my_cool_id'
events:
'click #here' : 'myFunc'
initialize: ->
render: ->
ModelClass = Backbone.Model.extend
idAttribute: 'id'
initialize: ->
CollectionClass = Backbone.Collection.extend
model: ModelClass
initialize: ->
RouterClass = Backbone.Router.extend
routes:
'': 'index'
':id' : 'thisId'
'*path' : 'thisPath'
initialize: ->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment