Example:
<template name="list_customers">
<p><h3>List Customers</h3></p>
{{#each customers}}
{{> list_customers_content}}
{{/each}}
</template>
<template name="list_customers_content">
..display all customer data from "Customers.find({})...
{{> list_customers_content_ip}}
</template>
<template name="list_customers_content_ip">
.. display data from Customers_ip.find({}) based on #each customer object id.
</template>
Template.list_customers.helpers({
customers() {
return Customers.find({});
},
});
How can this be done in fewest possible queries to two different collections, and is there any way to use the customers context object id? Please write full example.
What should the helper for Customers_ip.find() look like?