我需要将字符串呈现为 html 中的Revel
. 这个怎么做?我试过了:
func (c Pages) Show(url string) revel.Result {
bigDig := "<h1>Hello, dig!</h1>"
return c.Render(bigDig)
}
然后在view
:
{{template "header.html" .}}
{{.bigDig}}
{{template "footer.html" .}}
但它不起作用。这个怎么做?