Answer the question
In order to leave comments, you need to log in
Conflict between VueJS templates and Go templates, how to fix?
Trying to change template call signs:
tmp,err := template.New("...").Delims("").ParseFiles("...")
tmp.Execute(w,...)
tmp := template.New("...")
tmp.Delims("")
tmp.ParseFiles("...")
Vue.config.delims = [''] /*или*/ new Vue({ delims : [''] })
nothing changes! <!-- {{ `{{ }}` }} -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<!-- <link rel="stylesheet" href="{{ .Dirpath }}/style.css">
<script src="{{ .Dirpath }}/index.js"></script> -->
{{ template "include" .}}
<title>{{ .Title }}</title>
</head>
<body>
<header>{{ template "header" }}</header>
<!-- {{ `{{ }}` }} -->
<div id="VueROOT">
<card title="one">{{ test }}</card> <!-- card is vuejs component; test - vuejs template -->
</div>
test
<footer>{{ template "footer" }}</footer>
</body>
</html>
Answer the question
In order to leave comments, you need to log in
I just had to do Execute by define "..." in the file, a banal mistake!
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question