AngularJS-Twig conflict with double curly braces

前端 未结 11 776
孤独总比滥情好
孤独总比滥情好 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:19

    This is a compiled version of the best answers and a example for verbatim blocks:

    For single insertions, use:

    {{ '{{model}}' }}
    

    or if you use a twig variable

    {{ '{{' ~ twigVariableWitModelName ~ '}}' }}
    

    Verbatim, is very elegant and readable for several angular variables:

    
        {% verbatim %}
            
        {% endverbatim %}
    
    {{user.name}} {{user.age}}

提交回复
热议问题