The directory structure in Ember App Kit dictates that all controllers go in the '/app/controllers/' directory; handlebars templates go in the '/app/templates/' directory, and so on.
However, my team are currently developing an Ember application in which the number of functional areas (and therefore source files) is continually growing, so we want to create subdirectories under these directories for our controllers, templates, etc, rather than group everything in the same directory.
We have done this for one functional area by organising our controller and corresponding handlebars template in the following manner:
/app/controllers/availability/availability.js
/app/templates/availability/availability.hbs
So far, the only way we have been able to get this approach to work (i.e. to link our controller and template in this nested directory structure) is to create the following route:
this.route('availability.availabilty', {path: "/availability"});
This has the side-effect of Ember creating the following for us:
Route Name: availability.availability
Route: AvailabilityAvailability
Controller: AvailabilityAvailabilityController
Template: availability/availability
URL: #/availability
The word 'Availability' is duplicated in the resulting Ember controller to echo our nested availability/availability directory structure.
Does anyone know of a better way of organising an application in subdirectories within Ember App Kit? This surely must be a common requirement for applications with a large number of source files.
We would wish, for example, for Ember to create the following for us:
Route Name: availability.availability
Route: AvailabilityAvailability
Controller: AvailabilityAvailabilityController
Template: availability/availability
URL: #/availability
Many thanks