Nested span with price does not show, only the one with h4. How to solve this out?
<h4 th:text="${dish.name}">chicken fried salad <span th:text="${dish.getPrice()}">45</span></h4>
CodePudding user response:
th:text overwrites the contents of everything inside it. Something like this is will work for you:
<h4>
<span th:text="${dish.name}">chicken fried salad</span>
<span th:text="${dish.price}">45</span>
</h4>
