Conflict on Template of Twig and Vue.js

后端 未结 10 2270
一向
一向 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 17:08

    This is tested and working - vue js vars in twig template:

        new Vue({
           el: '#app',
           delimiter: ['{}'], // any delimiter you would like
        })
    

提交回复
热议问题