vue: Custom delimiters not working in 2.0.0-rc.4

Vue.js version

2.0.0-rc.4

Reproduction Link

Fiddle with version 2.0.0-rc.4 demonstrating the bug: https://jsfiddle.net/pth128xd/ Fiddle with version 1.0 and otherwise identical code: https://jsfiddle.net/yqyeL0hk/

Steps to reproduce

  1. Set Vue.config.delimiters to some custom setting, such as ['${', '}']
  2. Attempt to use custom delimiters in templates, e.g. ${ title }

What is Expected?

Interpolation using these custom delimiters is done properly.

What is actually happening?

The custom delimiters are completely ignored.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 2
  • Comments: 17 (4 by maintainers)

Most upvoted comments

Oh, you may be right, sorry. Need to check.

But if I remember correctly, changing delemiters may only available in the standalone build and with in-DOM templates. The reasoning was that templatws in .vue files are precompiled so they can’t conflict with any other servet-side template system (which was why custom delimiters existed in the first place)

Sorry guys, I’ve seen many answers, but there is no actual answer. Can you just show one simple example how to use delimiters in Components? (I mean in *.vue files)

in the case someone want this to work globally:

    Vue = Vue.extend({
        delimiters: ['<%', '%>']
    });

pls how can i change delimiters using vue webpack-simple

new Vue({
  delimiters: ['[[', ']]'],
  el: '#app',
  render: h => h(App)
}) 

this doesn’t work… pls help me