Golang and AngularJS template conflict

后端 未结 7 1498
闹比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:12

    Solution that won't require changing delimiters:

    Use {{"{{"}} for opening and {{"}}"}} for closing angular expressions.

    Example:

    {{"{{"}} 1 + 2 {{"}}"}}
    

提交回复
热议问题