【发布时间】:2014-03-17 04:23:15
【问题描述】:
我有以下模板:
<body>
<table border="1px">
{{> test}}
<table>
</body>
<template name="test">
{{#each items}}
<tr>
{{> test2}}
</tr>
{{/each}}
</template>
<template name="test2">
<td>{{name}}</td><td>{{lastruntime}}</td><td>{{result}}</td><td>{{blaat}}</td>
</template>
以及以下客户端代码:
ScheduledTasks = new Meteor.Collection("scheduledTasks");
if (Meteor.isClient) {
Template.test.items = function () {
return ScheduledTasks.find({});
}
};
现在 {{blaat}} 不是文档的一部分,但需要根据单个行中的数据填充数据。我尝试了很多,但不知道如何访问/填充 {{blaat}} 标签。有人吗?
【问题讨论】:
标签: meteor handlebars.js each