If the parent is the enclosing component, and the child component is rendered through the parent’s {{yield}} helper, then the child should have access to properties in the parent component via parentView. There’s an outstanding proposal to rename this to parentComponent for components.
Allow the parent template to wrap the child components:
Oh I see. I don’t think you could put {{yield}} inside an each block, because yield is an outlet for content between the open and close component tags. It is only yielded once.
However, I’m curious why you’re passing filterOptions as an array into the parent, and then using #each in the parent template to create the child components. Does filterOptionsalways come from a controller property? If you want to the component to be more flexible, so that you can declare options right in your templates, then you could put each within the yield like this:
In my case it does always come from the controller. The filters will depend on the model and will never change. I’ve changed it now to actually to be wired up in the component itself as to keep the template nice and agnostic from my user’s perspective. Thanks for your insight friend.