Conflict on Template of Twig and Vue.js

后端 未结 10 2241
一向
一向 2020-12-02 16:27

I\'m doing a program using Slim 2 that uses Twig as my templating engine. so It uses the syntax {{ foo }} in php file. On the other hand, I\'m using vue.js, it

10条回答
  •  眼角桃花
    2020-12-02 16:57

    Instead of changing delimiters, making components less reusable or using less readable double escaping mechanisms, you can use Twig's source function.

    The source function returns the content of a template without rendering it:

    {{ source('template.html') }}
    {{ source(some_var) }}
    

    Example:

    
    
    
    
    

提交回复
热议问题