Hi,
Snipped some code, but below should give idea what I’ve done.
Defined the seed data.
var mylist = [{
num: "ABC",
items: [{
line: 1,
item: "001"
}, {
line: 2,
item: "002"
}]
}];
Created the template.
<template name="orders">
{{#each orders}}
{{num}}
{{/each}}
</template>
Created the helper.
Template.orders.helpers({
orders ( ) {
return orders.find({});
}
});
Order numbers are being listed just fine. Now my problem, I want to show the items.
<template name="items">
{{#each items}}
{{item}}
{{/each}}
</template>
Here’s the helper
Template.items.helpers ({
items ( ) {
// my question below.
}
});
how to return the items of the order?
TIA!