Vue.js change {{ }} tags

后端 未结 5 1918
野的像风
野的像风 2020-11-30 03:01

I want to change the {{ something }} by <% something %> in Vue.js, how could I achieve that, is it even possible?

An equivalent for w

5条回答
  •  再見小時候
    2020-11-30 03:24

    With the latest version (2.0.5), the above doesn't work. Rather than assigning to the global config, you pass the delimiters as an option to the Vue instance:

    new Vue({
        el: '#app',
        data: data,
        delimiters: ["<%","%>"]
    });
    

    At least, that's what I had to do to make it work.

提交回复
热议问题