{name} is not replaced if they are in the attributes, how to handle?
The test开发者_JAVA技巧 code is:
val s = "#"
val x = <a href="{s}">{s}</a>
println(x)
It prints:
<a href="{s}">#</a>
Notice the {s}
is still there in the attribute, how to fix it?
val s = "#"
val x = <a href={s}>{s}</a>
println(x)
Notice no quotes! Prints:
<a href="#">#</a>
精彩评论