backbone-recursive-model

## Is this for me?

npm install backbone-recursive-model
4 downloads in the last week
17 downloads in the last month

Backbone Recursive Model

Is this for me?

If you need to nestle Backbone models in each other and keep instance references and event bindings after .save(), then this is the ticket.

Node.js

$ npm install backbone backbone-recursive-model

Backbone is not set as a dependency in the package.json but is required to be installed to use the RecursiveModel class. The reason for this is because you need to share the same instance of Backbone.

require('backbone-recursive-model');
var Backbone = require('backbone');

var MyModel = Backbone.RecursiveModel.extend({});

Or

var RecursiveModel = require('backbone-recursive-model');

var MyModel = RecursiveModel.extend({});

Browser

Just include the index.js file in a script tag together with Backbone and your ready to go.

npm loves you