-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make project compatible with Backbone 1.1 and up #1
Comments
Hey Paul, all well in freelancer-life? I also ran into this issue and this is my solution at the moment: define(['backbone'], function(Backbone) {
'use strict';
Backbone.View = (function(View) {
return View.extend({
injector: 'inject',
constructor: function(options) {
options.injector.injectInto(this);
View.apply(this, arguments);
}
});
})(Backbone.View);
return {};
}); Overriding the constructor instead of the _configure function seems the way to go. Could do a proper test pull-request for that later, just a quick fix for the moment :) |
Hi Thijs, |
My pleasure! Have been using the injector ever since and wouldn't want to miss it in Backbone :) Anyway I'm also quite slammed at the moment, we'll tidy this up in due time. |
From version 1.1 and up, Backbone no longer uses the internal _configure method upon which we rely. Therefor the automatic injection that this library provides does no longer work.
The text was updated successfully, but these errors were encountered: