Last Updated: February 25, 2016
·
1.475K
· kevinsimper

Symfony Twig and Angularjs with the Curly Braces

Sometimes you want to make your angular inside twig templates, but that is a problem since they both use the same curly braces in their templating.

The easiest way is to use Twig's verbatim tag.

So it would like this with angular and twig together:

Hi {{username}}

{{ verbatim }}
<ul ng-repeat="action in actions">
  <li>{{action}}</li>
</ul>
{{endverbatim}}