[英]HandlebarsJS : Change the text color depending what text value is?
在我的handlebars
电子邮件HTML
模板中,我有下表:
<div class="table">
<table id="carTable">
<tbody>
<tr>
<th>Car Number</th>
<th>owner</th>
</tr>
<!-- {{#each car}} -->
<tr>
<td>{{carNumber}}</td>
<td>{{owner}}</td>
</tr>
<!--{{/each}} -->
</tbody>
</table>
</div>
是否有可能如果{{owner}}
的值是例如“foo”那么文本将是红色的,如果值是“bar”那么它会是蓝色等?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.