backbone-nested icon indicating copy to clipboard operation
backbone-nested copied to clipboard

The plugin should return the NestedModel object instead of Backbone. (CommonJS, AMD)

Open achinaou opened this issue 9 years ago • 2 comments

When I require("backbone-nested-model") it returns the Backbone object but it should return the NestedModel object so you can instantiate or extend from it a new NestedModel object.

This is how it works now:

var Backbone = require("backbone-nested-model");

var User = Backbone.NestedModel.extend({
});

var user = new User();

This is how it should be:

var NestedModel = require("backbone-nested-model");

var User = NestedModel.extend({
});

var user = new User();

achinaou avatar Nov 17 '15 12:11 achinaou

I can create a PR but it can be dangerous because it's a breaking change.

achinaou avatar Nov 17 '15 14:11 achinaou

That's true. Ask @afeld pay attention for this.

just-boris avatar May 18 '16 13:05 just-boris