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}}Written by Kevin Simper
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Angularjs
Authors
Did you know?
AngularJS pages are long-lived browser apps with the same script risk as a newer single-page app. Third-party code in the template can read forms and values rendered on the page.
Security insights from Cside
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#