Skip to content
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

[BUGFIX beta] Ensure injections happen in engine instances. #14140

Merged
merged 2 commits into from
Aug 28, 2016

Conversation

rwjblue
Copy link
Member

@rwjblue rwjblue commented Aug 27, 2016

Prior to this _environment could not be relied upon in routes or views (which is used when shouldRender: false is used with visit).

The refactor uses the environment to determine what injections to setup in the engine-instance, and has the application-instance defer to the engine-instance to avoid duplication.

Also, removes manual threading of props.renderer (as requested in #14139).


Ensure that all components receive type injections.

Prior to this change we were defaulting to Ember.Component which does not receive injections (which meant it was missing the renderer). This worked "ok" in HTMLBars since we created a default global renderer to handle components/views without a container/owner.

This change ensures that in the template only component case we fall back to using the default component looked up from the owner. This ensures that injections are present.

Robert Jackson added 2 commits August 27, 2016 16:29
Prior to this `_environment` could not be relied upon in routes or
views (which is used when `shouldRender: false` is used with `visit`).

The refactor uses the environment to determine what injections to setup
in the engine-instance, and has the `application-instance` defer to the
`engine-instance` to avoid duplication.
Prior to this change we were defaulting to `Ember.Component` which does
not receive injections (which meant it was missing the `renderer`).
This worked "ok" in HTMLBars since we created a default global renderer
to handle components/views without a container/owner.

This change ensures that in the template only component case we fall
back to using the default component looked up from the owner. This
ensures that injections are present.
@rwjblue
Copy link
Member Author

rwjblue commented Aug 27, 2016

Added another commit to ensure that all components receive type injections. See description for more details.

@rwjblue rwjblue merged commit c5b10f1 into emberjs:master Aug 28, 2016
@rwjblue rwjblue deleted the cleanup-engine-registry-setup branch August 28, 2016 02:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant