AngularJS-Twig conflict with double curly braces

前端 未结 11 787
孤独总比滥情好
孤独总比滥情好 2020-11-22 14:39

As you know, both angular and twig has common control construction - double curly braces. How can I change default value of Angular?

I know that I can do it in Twig,

11条回答
  •  误落风尘
    2020-11-22 15:26

    If you're not interested in changing the template tags of the existing angular syntax which would require some confusing rewriting of your existing angular templates.

    One can just use the twig template tags with angular tags like so:

    {% verbatim %}{{yourName}}{% endverbatim %}
    

    Found this on another similar thread answer: Angularjs on a symfony2 application

提交回复
热议问题