I have an Aurelia application up and running and I am using a template with bindable parameters.
<template bindable="textitems">
${textitems}
<section id="one" class="wrapper">
<div class="inner flex flex-3">
<div class="flex-item left">
<div repeat.for="textitem of textitems">
<p>${textitem}</p>
</div>
</div>
</div>
</section>
</template>
And I am passing it in like this
<attractor textitems="${attractors}"></attractor>
where attractors is the array of items.
This basically is not behaving as I would like for it to.
${textitems}
is spitting out the right content in this case one,two
but - when it gets to the repeat for section - aurelia complains that it (textitems
) is not iterable.
I have since found out that this is because it becomes a string of the array being output. So it becomes 'one,two'
rather than ['one','two']
If so there must be a better way for me to pass this data down into the template.
Bindable definately seems the cleanest method, but Id love to be proven wrong.
Thanks for your time, no one seems to have been presented with this issue yet, but I am just getting started, and I think it will help others.