backbone.js - Can a Backbone model contains its own Collection -


can backbone model contains collection of own type?

component = backbone.model.extend({ defaults:{ 'name' : 'name1', 'subcomponents' :backbone.collection.extend({ model: component  }); } }); 

of course.

you can have complex backbone model graph, advise maintain backbone relational or similar libs.


Comments