3 ms·
1. Agreed, it force you to do things cleaner I guess. 2. The way I get around the problem is that bindModel takes (model, eventName, func, context) so having
by halayli 15y ago
1. Agreed, it force you to do things cleaner I guess.
2. The way I get around the problem is that bindModel takes (model, eventName, func, context) so having a view that represent different models isn't an issue in this case because it ends up being passed to bindModel.
example:
initialize: function () {
this.bindModel(this.model.get('someCollection'), 'add', someFunc, this);
}
In the app I am working on, my models tend to live much longer than the views, and they usually get updates from the server.
- malandrew 15y agoCan you explain a bit more about #2? I'm not sure I understand fully what you mean.