如何在KTOR中添加锚点<a>?

时间:2019-11-23 16:34:15

标签: ktor

我们如何在KTOR的HTML DSL中声明<a>?我知道有一个像a { href = "example.com" }这样的标签,但是我不能设置它的标签。因此,它不会出现。

1 个答案:

答案 0 :(得分:1)

docs您可以得到以下示例:

a(target = "myCustomValue") { + "..." }

对于您来说,这是:

a(href= "example.com") { + "example.com" }