Golang and AngularJS template conflict

后端 未结 7 1494
闹比i
闹比i 2021-01-07 23:54

I have a conflict with golang html/template and angularjs delimiters. I know that there is a method that lets to change delimiter in Go, but it does not work for me. Maybe i

7条回答
  •  孤城傲影
    2021-01-08 00:24

    Similar to Bijans answer but a bit more readable. You can use "printf" in your template to print a string literal. This works just the same for the "html/template" package.


    For example: {{ printf "{{}}"}}. https://golang.org/pkg/text/template/#pkg-overview

提交回复
热议问题