Skip to content

Instantly share code, notes, and snippets.

@CheezItMan
Created April 27, 2017 15:10
Show Gist options
  • Save CheezItMan/5fea6abc8ceeda31e14a691ca0938159 to your computer and use it in GitHub Desktop.
Save CheezItMan/5fea6abc8ceeda31e14a691ca0938159 to your computer and use it in GitHub Desktop.
import Backbone from 'backbone';
var Task = Backbone.Model.extend({
defaults: {
title: '',
completed: false
},
logStatus: function() {
console.log("Title: " + this.get("title"));
console.log("Completed: " + this.get("completed"));
},
toggleComplete: function() {
this.set("complete", !this.get("complete"));
}
});
export default Task;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment