Hyphenated routes `needs` explaining


Given this route:

this.resource('line-items', function() {});

the following needs will reference an instance of App.LineItemsIndexController but it won’t be the same as that available in the App.LineItemsIndexRoute instance.

needs: 'line-items-index'

needs: 'lineItemsIndex'

needs: 'LineItemsIndex'

The solution looks rather awkward:

needs: 'line-itemsIndex'

Are there any other solutions or perhaps some possible improvements? Should the rules be more strict as to the kind of formatting that can be used?


Dot notation should work


Unfortuately, the dot notation (line-items.index) throws a reference error, ReferenceError: <App.ValueController:ember266>#needs does not includeline-items``

See http://emberjs.jsbin.com/xilos/10/edit

A slash notation (line-items/index) gives: Error: Assertion Failed: You are looking for a index controller in the Line-items namespace, but the namespace could not be found


Sorry, I should have been clearer. http://emberjs.jsbin.com/gekiquca/1/edit


I’m not sure that solves the issue.

I’ve added to my demo with better instructions: