Skip to content

Instantly share code, notes, and snippets.

@SpencerCooley
Created February 5, 2016 15:09
Show Gist options
  • Save SpencerCooley/bff01d0feb5014dd3c7d to your computer and use it in GitHub Desktop.
Save SpencerCooley/bff01d0feb5014dd3c7d to your computer and use it in GitHub Desktop.
var Todo = require('../models/todo.js')
//a collection of todo model objects
var TodoList = Backbone.Collection.extend({
//Todo model is a dependency so we require it at the top of this file.
model: Todo
});
//simply just export your variable
//this will allow you to require it when creating other modules.
module.exports = TodoList;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment