Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent vue-cli templating from colliding with vue's own handlebar {{}} template markers #546

Closed
bachi76 opened this issue Aug 2, 2017 · 4 comments

Comments

@bachi76
Copy link

bachi76 commented Aug 2, 2017

As suggested by @LinusBorg in #284 (comment) I'll add this as feature request:

Problem: Currently, we cannot use vue-cli's templating feature with a bit larger template projects that contain many vue files, since both use handlebars and the delimiters collide: vue-cli will remove all vue {{}} tags unless \ is used everywhere, which is not reasonable in a larger template project.

Also, when working on the template project, vue will complain about missing data for the template strings used in vue-cli.

Idea: As with handlebars it's not possible to change the delimiters (handlebars-lang/handlebars.js#1184), the only solution seems to be to replace handlebars with e.g. mustache which allows custom delimiters (https://github.com/janl/mustache.js/#custom-delimiters) and works quite similar.

(I'm not sure if this is in scope, but certainly the collisions prevent some nice vue-cli template use-cases, in my case bootstrapping an IoT app which comes already with a basic set of features/vue components).

@ggiotopoulos
Copy link

This is a very important feature. I work at a large biotech in Boston. We are attempting to implement Vue as a front end on a number of large single page applications here. We'd like our development team to have a nice default template to start with. Within that template we have some default data between {{}} that's very useful to demonstrate default functionality.

@LinusBorg
Copy link
Member

Have you tried the skipInterpolation option?

@ggiotopoulos
Copy link

no

@DrSensor
Copy link

DrSensor commented Jan 7, 2018

Using \{{ myData }} also works, although you need to add \ on every Vue handlebars.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants