Components and sub-directory

Does Ember support components organized in sub-directories ? see https://github.com/ember-cli/ember-cli/issues/1219#issuecomment-218873070

I use POD and i organize all my components in app/components/* sub-directories:

  • app/components/forms/
  • app/components/table/
  • etc.

But, when i call my components in templates, i don’t know which notation to use:

{{#forms/test-field}}…{{/forms/test-field}}

OR

{{#forms.test-field}}…{{/forms.test-field}}

Both work… I prefer the second (with dot) because i prefer to keep the slash character to identify end of HTML and HTMLBars blocks.

What do you think? What is Ember’s recommended way of doing that (if it’s supported by Ember) ?

Use a slash, not a dot. Dots work sometimes but were never intended to work and may break in the future …

Thank you. But how will it work with (future) angle bracket components ?

Unclear on this, angle brackets haven’t officially been RFCed yet, so details on them are fuzzy.

Does anyone know how this works with the Octane ed?

ie Anglebrackets.

With octane we use :: separator in templates to access components within a folder , and we use pascal case for naming ( capitalize the first letter and every letter after - , then remove the hyphens) : <Forms::TestField>…</Forms::TestField>