In an ember-cli addon project, if I put a file in the addon/components/my-component.js
, how do I use then in the consuming applications handlebars files?
Normally you would use the following if it were in the application namespace:
{{my-component}}
If your addon is called "Ember CLI Some Addon", then:
import DataRouteMixin from "ember-cli-some-addon/mixins/data-route";
See: https://github.com/stefanpenner/ember-cli/pull/1544
In your case, with a component, to make it available to all the templates you would have to inject it into to the container using an initializer. Although, that looks like fighting your way against the Ember CLI workflow.
If you place the addon component in the app/
folder the component will be available to every template.