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 release] Deprecate Controller#needs #11767

Merged
merged 1 commit into from Jul 16, 2015
Merged

[BUGFIX release] Deprecate Controller#needs #11767

merged 1 commit into from Jul 16, 2015

Conversation

ghost
Copy link

@ghost ghost commented Jul 16, 2015

Resolves #11683

I also changed the wording of the deprecation message for controllerFor.

rwjblue added a commit that referenced this pull request Jul 16, 2015
[BUGFIX release] Deprecate Controller#needs
@rwjblue rwjblue merged commit b19eb2c into emberjs:master Jul 16, 2015
@rwjblue
Copy link
Member

rwjblue commented Jul 16, 2015

Thanks!

@ghost ghost deleted the deprecate-needs branch July 17, 2015 16:32
@novtor
Copy link

novtor commented Jul 23, 2015

When replacing needs by Ember.inject.controller as stated in documentation, the ReferenceError occurs:

Uncaught ReferenceError: XXXController #needs does not include YYYController. To access the YYYController controller from XXXController , XXXController should have a needs property that is an array of the controllers it has access to.

@ghost
Copy link
Author

ghost commented Jul 23, 2015

Try this.get('yyy') instead of this.get('controllers.yyy')

@novtor
Copy link

novtor commented Jul 23, 2015

Thank you @martndemus, I was using Ember.computed.alias('controllers.ControllerXXX.somefield') and in templates {{controllers.ControllerXXX.somefield}}

@ghost
Copy link
Author

ghost commented Jul 23, 2015

Your welcome 😃

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.

3 participants