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

Assertion "Defining an injected controller property on a non-controller is not allowed." fails for ObjectControllers #10610

Closed
Kerrick opened this issue Mar 11, 2015 · 1 comment · Fixed by #10612

Comments

@Kerrick
Copy link
Contributor

Kerrick commented Mar 11, 2015

I seem to be unable to use Ember.inject.controller() on an Ember.ObjectController.

App.IndexController = Ember.ObjectController.extend({
    application: Ember.inject.controller()
});
Error while processing route: index Assertion Failed: Defining an injected controller property on a non-controller is not allowed. Error: Assertion Failed: Defining an injected controller property on a non-controller is not allowed.
    at new Error (native)
    at Error.EmberError (http://builds.emberjs.com/tags/v1.10.0/ember.debug.js:12443:23)
    at Object.Ember.assert (http://builds.emberjs.com/tags/v1.10.0/ember.debug.js:3940:15)
    at controllerInjectionHelper (http://builds.emberjs.com/tags/v1.10.0/ember.debug.js:28098:13)
    at validatePropertyInjections (http://builds.emberjs.com/tags/v1.10.0/ember.debug.js:28798:13)
    at Function.injectedPropertyAssertion (http://builds.emberjs.com/tags/v1.10.0/ember.debug.js:34309:55)
    at factoryFor (http://builds.emberjs.com/tags/v1.10.0/ember.debug.js:1860:19)
    at Object.Container.lookupFactory (http://builds.emberjs.com/tags/v1.10.0/ember.debug.js:1422:16)
    at null.<anonymous> (http://builds.emberjs.com/tags/v1.10.0/ember.debug.js:22671:46)
    at Descriptor.ComputedPropertyPrototype.get (http://builds.emberjs.com/tags/v1.10.0/ember.debug.js:10825:25)

http://emberjs.jsbin.com/resenaraha/1/edit?html,css,js,output

@rwjblue
Copy link
Member

rwjblue commented Mar 12, 2015

#10612 should address this

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 a pull request may close this issue.

2 participants