Hi! I’m trying to convert one of my EmberComponent components into addon and I have problem to get component’s template working. Component itself is renderet properly, but without template which is defined in separate file.
Templates are supposed to go into app/templates, not into addon/templates.
AFAIK code in addon lives in the addon’s own namespace, which is implemented using ES6 modules. Hence you to have to import the component in app/components. But Handlebars templates have no notion of being namespaced, since they are not ES6 modules.
Thank you for explanation! So from what I understand I have to implement component logic in addon/components/name.js, than in app/componets/name.js include those components (using ES6 import) and put template in app/templates/components. Than logic for in browser testing in app comes in tests/dummy/app/ right?
Hi, I’m using ember-cli@0.2.0 and the component blueprint for addons is creating a template in the addon directory as well as an import statement for the template as layout. Has something changed in regards to how addons should support components that have templates? I’m seeing the same issue as the OP but it seems partials can only be used in the component template if the partial is in the app directory. It seems odd that the blueprint suggests the template should live in addon but partials only work from app. What is the suggested layout for things like this now?