I want to use Vue.js with the Golang's HTML template engine but as both use {{ ... }}
for syntax, they conflict with each other...
Does anyone has already did it somehow or have any suggestions on how to overlap this problem?
Thanks in advance.
You can use Vue to build standard Web Components that can be embedded in any HTML page, regardless of how they are rendered.
The simplest way to get started with Vue is to grab the development version script for it and add it to the head tag of your HTML file. Then you can start Vue code inside the HTML file inside of script tags. And have the Vue code connect up with an existing element on your HTML page.
Vue Interpolation It's simply the process of displaying a string that's defined within your component logic.
In 2. x, Vue provided the inline-template attribute on child components to use its inner content as its template instead of treating it as distributed content. <my-component inline-template> <div> <p>These are compiled as the component's own template.</
You can change delimiters used by Vue. Look the documentation
You can change the default delimiters for Go templates. Use:
func (t *Template) Delims(left, right string) *Template
Docs: https://golang.org/pkg/text/template/#Template.Delims
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With