Go/Golang AngularJS Conflict

Kevin FOO
Apr 21, 2021

--

If you are running a web server with Go/Golang, chances are you often pass values from back end to front end using the curly brackets field substitution. In the example below, I’m passing “some_string” and “some_number”.

The 2 values can be easily obtained with double curly brackets.

If you are using AngularJS with Golang field substitution. You will hit an error because AngularJS uses double curly brackets too. To solve this problem I change the AngularJS double curly brackets to double square brackets.

< Back to all the stories I had written

--

--

Kevin FOO
Kevin FOO

Written by Kevin FOO

A software engineer, a rock climbing, inline skating enthusiast, a husband, a father.