Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need to be able to choose the action delimiters of templates #35

Closed
zaibon opened this issue Jul 3, 2014 · 3 comments
Closed

Need to be able to choose the action delimiters of templates #35

zaibon opened this issue Jul 3, 2014 · 3 comments
Assignees
Labels

Comments

@zaibon
Copy link

zaibon commented Jul 3, 2014

I'm using Gin with angularjs, since angular also use {{ }} we have change the action delimiters of go templates.

@zaibon zaibon closed this as completed Jul 3, 2014
@javierprovecho javierprovecho self-assigned this Jul 7, 2014
@shaunnbarron
Copy link

I use Context.Data(code, content-type, data) to serve Angular templates. Hope this helps anyone struggling with this...

@diegogub
Copy link

I solved it doing so:

html, err := template.New("").Delims("[[", "]]").ParseFiles("site/index.html", "site/login.html", "site/signup.html") if err != nil { panic(err) } router.SetHTMLTemplate(html)

@behouba
Copy link

behouba commented Nov 2, 2022

This also worked for me:

...
router.Delims("[[", "]]")
router.LoadHTMLGlob("website/templates/*")
...

router is of type *gin.Engine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants