【发布时间】:2015-09-11 02:34:46
【问题描述】:
我在 Grails 2.5.x 中使用资产管道。我将包含图像的 img 文件夹放入资产文件夹中。
但是在 js 文件中,我不能在图片路径中使用<assets:image 标签。
例如:
controlHTML: '<img src="../img/up.png" style="width:40px; height:40px" />'
我可以找到路径,但在 web 检查元素中,路径不正确:'localhost:9090/CardReg/img/up.png'
我放的时候出错
controlHTML: '<img src="<asset:image src='../img/up.png'/>" style="width:40px; height:40px" />'
有什么想法吗?
我们将不胜感激任何解决方案。谢谢你。
【问题讨论】:
标签: html grails asset-pipeline