4 ms·
That's a good question. If you think of a model representing whats behind a view, in a non-web world (stateful), selectedness can very well sit in a model - as
by jondot 15y ago
That's a good question. If you think of a model representing whats behind a view, in a non-web world (stateful), selectedness can very well sit in a model - as long as it represents a state of the view.
In this example, the selectedness sits in the collection, however it may sit in the view. See more about this here, for example:
http://stackoverflow.com/questions/6519990/best-way-to-make-one-model-selected-in-a-backbone-js-collection http://stackoverflow.com/questions/6519990/best-way-to-make-...
- finpingvin 15y agoYup, can simplify code for wiring together views a great deal and promote decoupling between them.