-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Dependency Injections are broken when using ember 2.12 and newer. #4807
Comments
Here are a few of the steps on the code safari that @workmanw and I just went through:
Most likely we should refactor to return the actual
|
I submitted #4808 to remove this as an issue. |
I have some cycles, working on this now. |
@stefanpenner Thanks a lot for jumping on this. I'm happy to help in any way I can. |
*note: this combined with embers factoryFor makes `MODEL_FACTORY_INJECTIONS` irrelevant.*
*note: this combined with embers factoryFor makes `MODEL_FACTORY_INJECTIONS` irrelevant.*
*note: this combined with embers factoryFor makes `MODEL_FACTORY_INJECTIONS` irrelevant.*
*note: this combined with embers factoryFor makes `MODEL_FACTORY_INJECTIONS` irrelevant.*
*note: this combined with embers factoryFor makes `MODEL_FACTORY_INJECTIONS` irrelevant.*
[Fixes #4807] realize class + factory seperation
*note: this combined with embers factoryFor makes `MODEL_FACTORY_INJECTIONS` irrelevant.*
*note: this combined with embers factoryFor makes `MODEL_FACTORY_INJECTIONS` irrelevant.*
*note: this combined with embers factoryFor makes `MODEL_FACTORY_INJECTIONS` irrelevant.*
FYI - #4820 backports the fix to release branch (which will likely be released as a 2.11.x bugfix release). |
Originally filed as: emberjs/ember.js#14941
Ember-Release (2.11.x): Working Twiddle
Ember-Beta (2.12.x): Broken Twiddle
It seems that using
owner.inject
targeting amodel
type is broken w/ ember-beta. Example:Additionally, other ember types, such as component and controller, work as expected.
@rwjblue helped me on slack to track this down a bit. We believe the cause of the problem lies with the implementation of
modelForFactory
(store#modelForFactory).Prior to Ember 2.11, ember-data used
_lookupFactory
and internally that would do all of the dependency injections via an expensive.extend()
process. One benefit offactoryFor
is that it does not do this and thus saves perf. But the consequence is that when instantiating a class extracted from a "factory manager" those injections still need to be setup.The text was updated successfully, but these errors were encountered: