Answer the question
In order to leave comments, you need to log in
How to make mustache friends in node.js and vue.js?
I decided to try vue.js and immediately ran into problems.
As I understand it, the fact is that the application is based on node.js and mustache is used , which apparently "conflicts" with mustache when outputting data from vue.js.
In general, simple:
var App = Vue.extend({
name: "app"
});
var vm = new App({
el: "#app",
data: {
name: 'test'
},
ready: function(){
console.log("Готово...");
}
});
<div id="app" data-name="{{name}}">{{name}}</div>
Answer the question
In order to leave comments, you need to log in
The solution was found.
To make it clear to mustache that {{construct}} should not be processed on the server side, you need to highlight the required markup section with the construction: {{={{{ }}}=}} ... {{{={{ }}=}}}
.
So in my case it looks like this:
{{={{{ }}}=}}
<div id="app" data-name="{{name}}">{{name}}</div>
{{{={{ }}=}}}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question