I am trying to pass in a component constructor to a child component, but when I do I get an error message: Assertion Failed: A helper named 'parent.section' could not be found
//parent-form.js
form-component as |f|
...
child-component f=f
//child-component.js
f.group as |g|
...
//form-component.js
with (hash group=(component 'form-section-component')) as |h|
yield
The strange thing is if I delay the parent.group call everything works fine. For example:
//child-component.js
if isShowingFormSection
f.group as |g|
...
When isShowingFormSection
changes to true, parent.group
gets called and renders just fine.
Does this mean the template is trying to instantiate the component before the component is ready?
Aucun commentaire:
Enregistrer un commentaire