Skip to content

Instantly share code, notes, and snippets.

@scottharvey
Created April 6, 2011 05:12
Show Gist options
  • Save scottharvey/905176 to your computer and use it in GitHub Desktop.
Save scottharvey/905176 to your computer and use it in GitHub Desktop.
MilestoneSet = Backbone.Collection.extend({
model: MilestoneModel,
initialize: function() {
this.bind('add', function(model) {
new ProjectView({ model: model });
});
}
});
Milestones = new MilestoneSet();
Milestones.add({id: 1, name: 'Initial research', model: window.project, time: '60h'}, {silent: true});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment