如何在春季靴子Thymeleaf中使用角度双向绑定标签

时间:2017-09-18 05:27:06

标签: angularjs spring thymeleaf

我在json文件中定义了我的图像,如下所示

certLogoURL:" /img/ocjp.gif"

我试图在我的百里香花模板中显示这个

<img th:src="@{ {{certificate.certLogoURL}} }" > </img>

图片未显示在我的网页上。

当我检查网页时,它会转换为

<img src="/img/ocjp.gif">

如果我将值硬编码为

<img th:src="@{/img/ocjp.gif}"> </img>

图像正常显示。

你可以帮我解决这个问题吗?

1 个答案:

答案 0 :(得分:0)

路径可能不好,请在2.4中查看http://www.thymeleaf.org/doc/articles/standarddialect5minutes.html。链接(URL)表达式