I’ve been trying to reference an existing component in a plugin-outlet, but I keep getting errors. And the main issue seems to be the actions associated with the component. Is there a proper way to reference the actions of another component in a plugin outlet?
I would have thought that in a plugin-outlet, just referencing the component (ie, {{component-name action=(action "doSomething")...}}
) would work to bring in all the relevant code of that component’s actions. But it seems like that is not the case–because I keep getting a variety of errors about certain things being undefined, improper definitions, and other stuff implying the javascript of the action is not being brought into the plugin outlet properly.
For example:
If in a template there is the following reference to the composer-action-title component, like this:
composer.hbs:
{{composer-action-title
model=model
openComposer=(action "openComposer")
closeComposer=(action "closeComposer")
canWhisper=canWhisper
tabindex=8
}}
and I wanted to add a plugin outlet that–in that plugin outlet–had the same code, like:
connectors/cool-outlet/cool-outlet.hbs:
{{composer-action-title
model=model
openComposer=(action "openComposer")
closeComposer=(action "closeComposer")
canWhisper=canWhisper
tabindex=8
}}
What do I need to do to allow my cool-outlet plugin outlet the ability to successfully reference the composer-action-title component, including the “openComposer” and “closeComposer” actions?