Go/Golang AngularJS Conflict

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

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store