[英]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.