Backbone default attribute inheritance by reference

Posted on by bika

As the following fiddle shows, Backbone passed the default values to models by reference, thus if the default value is an object, then changing the object in one model instance, changes the given attribute in all model instances.

This entry was posted in Magyar cikkek and tagged backbone, example by bika. Bookmark the permalink.