Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Bad form?
require(['jquery', 'backbone'], function($, Backbone) {
Reddit = Backbone.Model.extend({
initialize: function(){
console.log("oh snap! my name is "+this.get('name'));
}
});
var test = new Reddit({name: "test"});
var test2 = new Reddit({name: "test 2"});
});
require(['jquery', 'backbone'], function($, Backbone) {
var Reddit = {
model: Backbone.Model.extend({
initialize: function(){
console.log("oh snap! my name is "+this.get('name'));
}
})
};
var test = new Reddit.model({name: "test"});
var test2 = new Reddit.Model({name: "test 2"});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.