Skip to content

Instantly share code, notes, and snippets.

@dinh
Last active August 29, 2015 14:00
Show Gist options
  • Save dinh/11354684 to your computer and use it in GitHub Desktop.
Save dinh/11354684 to your computer and use it in GitHub Desktop.
Javascript: Backbone Model snippet for SBT
<snippet>
<content><![CDATA[
window.model_name = Backbone.Model.extend({ //instance members
url: "",
idAttribute: "_id",
initialize: function() {
},
default: function() {
}
}, { //class members
});
window.model_nameCollection = Backbone.Collection.extend({ //instance members
model: model_name,
url: "",
}, { //class members
});
]]>
</content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>bbmodel</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.js</scope>
</snippet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment