【发布时间】:2015-12-09 21:16:05
【问题描述】:
我有以下模板:
<template name="tempName" >
{{#each helperOne "1" "2" }}
<p>Lorem upsom</p>
{{#each}}
<a id="next"></a>
</template>
帮手:
template.tempName.helpers({
"helperOne":function(a,b)
{
console.log("a = "+a+" b ="+b);
}
});
template.tempName.events({
"click .next":function(e,tmp)
{
//how change dynamically a and b of the helperOne helper into the
// template defintion of tempName
}
});
谢谢你的帮助
【问题讨论】:
-
嘿@bouraoui {{#each}} 目前只接受数组、游标或虚假值。您不能将参数传递给 {{#each}} 块。