Closed matthewmueller closed 11 years ago
cool, thanks man!
np thanks!
well this problem could also be solved by giving model.set
a silent
option. The main issue this PR was solving was to prevent all the change events from being fired when you first initialize.
In #23 there is a proposal to emit a 'construct' event from the constructor which would be a better way to intercept the construction.
I think the ´silent´ parameter could probably be useful anyway, and it is expected by people migrating from backbone (not sure if that is an argument though).
Anyway I'd really like component/model and component/collection to progress into smth usable to make component an easier sell as a backbone replacement.
This pull request does two things:
new User(attr)
used to emit "change" events on every attribute)Model-level change events are particularly useful for synchronizing shared data between two client-side models, especially when the models arrive at different times during the life-cycle of the app.