With the new block parameters in 1.10.0, this can be done by doing the following:
{{#block-component as |component|}} <p> HTML inserted in block form </p> <p> How trigger a action from block-component (not your parent) from this scope? </p> <p {{action 'actionFromBlockComponent' target=component}}> Fire component action!!! </p> {{/block-component}}
Pay attention to the purpose of the action specified by the block parameter.
The component block template should contain the following:
{{ yield this }}
It simply passes the component itself, which will be used as the block parameter for any template using this component.
jcbvm source share