Components and sub-directory


#1

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) ?


#2

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


#3

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


#4

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