【发布时间】:2021-11-08 16:50:33
【问题描述】:
我想在 html 表格中显示以下行:
"$num out of $totalCount"
例如 num=5 和 totalCount=8
我想在表中看到5 out of 8
这是我的代码:
...
<tr>
<td th:text="${num} out of ${totalCount}" />
</tr>
...
我在控制器中添加了num 和totalCount 作为模型。
我收到以下错误:
Could not parse as expression: "${num} out of ${totalCount}"
这样做的正确语法是什么?
【问题讨论】:
标签: java html spring thymeleaf