Backbone.js - How to model a nested list -
i trying model multi-level nested list in backbone , wondering how best model collections/models.
i have (in coffeescript)
my collection
class app.collections.list extends backbone.collection model: app.model.listitem my model
class app.model.listitem extends backbone.model defaults: name: "foo" bar: "bar" children: new app.collections.list # doesnt work because need load models before collections parent: # initialized param hash i initialize view e new app.collection.list (of listitem models) gives list of depth 1. when click on listitem want perform http get, can populate it's children with, , on , forth. have 3 levels deep grow deeper.
should use supermodel [1] or backbone-relational [2]?
Comments
Post a Comment