Workiing example
This commit is contained in:
@ -1,15 +1,11 @@
|
||||
package handlers
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"templ-tests/app/templates"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func Home(c *gin.Context) {
|
||||
content := templates.Home()
|
||||
|
||||
c.Data(http.StatusOK, "text/html; charset=utf-8", []byte(content))
|
||||
templates.Home("World").Render(c, c.Writer)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user