0
votes

Backbone model attributes can be string, objects, backbone collection etc. But is it possible that an attribute is an array of backbone model?

Ex: var Model - Backbone model Model.get('charts') - Simple array [chart], here chart is the backbone model

Here my question is that ideally Backbone model attribute is if having array then it should be backbone collection or can be simple array of backbone Model?

1

1 Answers

0
votes

Technically there is nothing preventing you from doing that. However, backbone features such as model events won't propagate up to your parent model, since backbone doesn't support nested model/collections out of the box. So you don't get any "special" benefits by making a model property backbone collection instead of a normal array.