how could i made it work?
underscore 1.8
the exception :
SyntaxError: expected expression, got ')'
any help will be apprecicate!
{{_.each(data,function(item){}}
<tr>
<td>{{item.name}}</td>
<td>{{item.gender}}</td>
<td>{{item.age}}</td>
</tr>
{{});}}
overcome some trouble,the code worked
_.templateSettings = {
interpolate: /\{\{=(.+?)\}\}/g,
evaluate: /\{\{(.+?)\}\}/g,
};
the template
{{_.each(data,function(item){}}
<tr>
<td>{{=item.name}}</td>
<td>{{=item.gender}}</td>
<td>{{=item.age}}</td>
</tr>
{{})}}
refrenced each loop in underscore.js template