Using Vue.js in Golang HTML Templates

I want to use Vue.js with an HTML engine in Golang format, but since both use {{ ... }} for syntax, they conflict with each other ...

Has anyone already done this or have any suggestions on how to fix this problem?

Thanks in advance.

+5
source share
2 answers

You can change the delimiters used by Vue. See the documentation

+6
source

You can change the default delimiters for Go templates. Using:

 func (t *Template) Delims(left, right string) *Template 

Docs: https://golang.org/pkg/text/template/#Template.Delims

+6
source

All Articles