I need to access the data from AccountQueueController from a child controller. This used to work:
needs['accountQueue']
...
this.get('controllers.accountQueue.myProperty')
But now, as of Ember 1.11, this doesn’t work. I get:
needs [ controller:accountQueue ] but it could not be found
After fiddling around with it a bit, I found this to stop the above error:
needs['account/queue']
but now I can’t access the property I need using this.get(‘controllers…’). I’ve tried every possible casing I can think of and it always gives me some form of:
Uncaught ReferenceError: <versace@controller:account/queue-item::ember1124>#needs does not include `accountQueue`.
An additional bit of context - This version bump is part of switching my project from rails to Ember CLI, which for the record is a huge pain. I don’t know if the Ember CLI shift has anything to do with this, though it really shouldn’t.
As a sidenote, for a platform that supposedly is opinionated, the syntax for concatenation of names is incredibly arbitrary. I have seen all the following used for referencing AccountQueue, depending on context/Ember version:
AccountQueue
accountQueue
account-queue
account_queue
account.queue
account/queue
It is super frustrating, especially when all the guides with examples have a habit of using single worded class names. You would think this question about needs would be answered somewhere, but I simply can’t find an answer, or even an example, of a two worded class using needs “properly”.