3

I'm using jekyll with liquid for my website. I want to use angularjs to read json and parse the data on the html page. but both liquid and angularjs use {{}}. So when i try to display angularjs data, it won't because liquid thinks it's a variable created by jekyll. How can i use both jekyll and angularjs? or is there a better approach?

w1n78
  • 789
  • 1
  • 7
  • 19
  • nevermind, i found the answer http://stackoverflow.com/a/13671817/3893181 – w1n78 Oct 17 '14 at 18:05
  • possible duplicate of [AngularJS-Twig conflict with double curly braces](http://stackoverflow.com/questions/13671701/angularjs-twig-conflict-with-double-curly-braces) – Juho Vepsäläinen Oct 17 '14 at 18:57

1 Answers1

3

This question is kinda old now but I found a better solution than the one proposed in the linked SO question. The best way to use AngularJS with Jekyll is to use the raw tags like so:

{% raw %}
  \\ All the Angular goodness goes here...
{% endraw %}
Elmer
  • 809
  • 9
  • 15