【问题标题】:How to use angular two way binding tag in spring boot Thymeleaf如何在 Spring Boot Thymeleaf 中使用角度双向绑定标签
【发布时间】:2017-09-18 05:27:05
【问题描述】:

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

certLogoURL : "/img/ocjp.gif"

我正在尝试在我的百里香模板中将其显示为

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

图片没有显示在我的网页中。

当我检查网页时,它被转换成

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

如果我将值硬编码为

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

图像正在正确显示。

您能帮我解决这个问题吗?

【问题讨论】:

    标签: angularjs spring thymeleaf


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 2018-04-06
      • 1970-01-01
      • 2020-04-25
      • 2015-10-14
      • 1970-01-01
      • 2017-06-01
      • 2020-09-10
      • 2018-02-25
      • 2021-09-16
      相关资源
      最近更新 更多