HTML 中 angular 括号内的字符串连接
String concatenation inside angular brackets in HTML
如何在 HTML 中连接神社括号 {{ }} 内的字符串?
例如:<img src="{{ image.file.name }}">
我需要连接 image.file.name。
例如:<img src="{{ 'https://s3.ap-south-1.amazonaws.com/bucket_name/images/' + image.file.name }}">
但是他没有用。请帮忙。
你应该这样写
<img src="https://s3.ap-south-1.amazonaws.com/bucket_name/images/{{ image.file.name }}">
在 jija 中你不必与 +
连接它会在没有它的情况下替换 {{}}
如何在 HTML 中连接神社括号 {{ }} 内的字符串?
例如:<img src="{{ image.file.name }}">
我需要连接 image.file.name。
例如:<img src="{{ 'https://s3.ap-south-1.amazonaws.com/bucket_name/images/' + image.file.name }}">
但是他没有用。请帮忙。
你应该这样写
<img src="https://s3.ap-south-1.amazonaws.com/bucket_name/images/{{ image.file.name }}">
在 jija 中你不必与 +
连接它会在没有它的情况下替换 {{}}