Skip to content

Instantly share code, notes, and snippets.

@shoxty
Created August 21, 2012 03:43
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 shoxty/3411318 to your computer and use it in GitHub Desktop.
Save shoxty/3411318 to your computer and use it in GitHub Desktop.
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