mirror of
https://github.com/kataras/iris.git
synced 2025-01-23 18:51:03 +01:00
32 lines
712 B
HTML
32 lines
712 B
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>HTML Template Example</title>
|
|
</head>
|
|
<body>
|
|
<h2>Name: {{.Name}}</h2>
|
|
<h3>Age: {{.Age}}</h3>
|
|
|
|
<h4>Slice</h4>
|
|
{{range $idx, $item := .Items}}
|
|
{{ $idx }} - {{ $item }} <br/>
|
|
{{end}}
|
|
|
|
<h4>Map</h4>
|
|
{{range $key, $value := .Map}}
|
|
{{ $key }} - {{ $value }} <br/>
|
|
{{end}}
|
|
|
|
<h4>Nested</h4>
|
|
|
|
<strong>Title:</strong>{{ .Nested.Title}}
|
|
|
|
<hr/>
|
|
|
|
<strong>Read more at: <a href="https://golang.org/pkg/html/template" target="_new">
|
|
https://golang.org/pkg/html/template</a>
|
|
</strong>
|
|
</body>
|
|
</html> |