Created
September 9, 2012 11:00
-
-
Save zozo/3683797 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
App = new Backbone.Marionette.Application() | |
App.addRegions | |
content: "body" | |
class Model extends Backbone.Model | |
class Models extends Backbone.Collection | |
model: Model | |
class ItemView extends Backbone.Marionette.ItemView | |
template: _.template("item: <%= name %>") | |
class CompositeView extends Backbone.Marionette.CompositeView | |
template: _.template("<h1>LIST</h1><ul></ul>"); | |
itemView: ItemView | |
App.addInitializer -> | |
@collection = new Models() | |
view = new CompositeView | |
collection: @collection | |
App.content.show(view) | |
@collection.reset([new Model({name: 'some name'})]) | |
jQuery -> App.start() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment