Iterating through child components
- by ken
I have button-group component which contains a set of button-element components. The template is defined as:
{{#each buttons}}
{{button-element titleBinding="title" action="buttonAction"}}
{{/each}}
I'd like the buttonAction() method in the button-group component to have easy access to the set of button-element components and iterate through them. What's the easiest way to do this? I know I could use a jQuery/DOM approach like:
this.$('.btn').doSomething();
But I'd like to address the component objects not the DOM directly.