-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
Labels
Description
As we were discussing on the IRC, I think it would be nice if you could somehow declare a set of default attributes for a model that would get automatically set to their associated values when a model is initialized.
I think the implementation could be something along the lines of what you suggested:
Backbone.Model.extend({
defaultAttributes: {
key: 'value',
anotherKey: 'Its value'
}
});
or even simpler:
Backbone.Model.extend({
defaults: {
key: 'value',
anotherKey: 'Its value'
}
});
Reactions are currently unavailable