刀PPT提供免費PPT模板,紅色工作報告PPT模板,模板是設計好的PPT模板直接打開編輯即可。
頁數:16頁
編號:PPT96276
大小:4.39MB
軟件:PowerPoint
格式:PPTX
比例:16:9
復制下載:ppt.101dao.com/ppt/ppt-PPT96276.html
據說點“贊”的人很漂亮,點“喜歡”的人很好看,我的飯碗就靠你們了Thanks?(?ω?)?。
們可以使用以下的方式去渲染html
func main() {
router := gin.Default()
router.LoadHTMLGlob("templates/*")
//router.LoadHTMLFiles("templates/template1.html", "templates/template2.html")
router.GET("/index", func(c *gin.Context) {
c.HTML(http.StatusOK, "index.tmpl", gin.H{
"title": "Main website",
})
})
router.Run(":8080")
}
在html中我們可以使用特殊的雙花括號來渲染title這個值
<html>
<h1>
{{ .title }}
</h1>
</html>
值得注意的是這種方式并不是gin特有的,而是golang特有的,它還有其他的模板語法。
{{$article := "hello"}}
也可以給變量賦值
{{$article := .ArticleContent}}
{{funcname .arg1 .arg2}}
{{if .condition}}
{{end}}
{{if .condition1}}
{{else if .contition2}}
{{end}}
{{if not .condition}}
{{end}}
{{if and .condition1 .condition2}}
{{end}}
{{if or .condition1 .condition2}}
{{end}}
{{if eq .var1 .var2}}
{{end}}
{{if ne .var1 .var2}}
{{end}}
(less than){{if lt .var1 .var2}}
{{end}}
{{if le .var1 .var2}}
{{end}}
{{if gt .var1 .var2}}
{{end}}
{{if ge .var1 .var2}}
{{end}}
{{range $i, $v := .slice}}
{{end}}
{{template "navbar"}}
、紅色黨建風愛國主題教育班會:http://www.yomoer.cn/template/detail/7991.html
2、紅色黨建風年終工作總結計劃匯報:http://www.yomoer.cn/template/detail/7990.html
*請認真填寫需求信息,我們會在24小時內與您取得聯系。