/templates/requirejs/collection.js

https://github.com/Takashi527/generator-backbone · JavaScript · 15 lines · 11 code · 3 blank · 1 comment · 0 complexity · 6307507be42d905646a4111472615f6a MD5 · raw file

  1. /*global define*/
  2. define([
  3. 'underscore',
  4. 'backbone',
  5. 'models/<%= name %>'
  6. ], function (_, Backbone, <%= _.classify(name) %>Model) {
  7. 'use strict';
  8. var <%= _.classify(name) %>Collection = Backbone.Collection.extend({
  9. model: <%= _.classify(name) %>Model
  10. });
  11. return <%= _.classify(name) %>Collection;
  12. });