Created
August 21, 2012 03:43
-
-
Save shoxty/3411318 to your computer and use it in GitHub Desktop.
Bad form?
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
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"}); | |
}); |
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
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