V
V
VegasChickiChicki2020-04-20 16:54:39
JavaScript
VegasChickiChicki, 2020-04-20 16:54:39

Vue.compile loses application context after template compilation, what's wrong?

after compiling the template with Vue.compile (and adding it to the page, respectively), the application context is lost. That is, if you try to do something like:

Vue.compile(`
   <div>{{test}}</div>
`)


test - variable from data. An error occurs:
Property or method "compiled" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property.

The question is, how to pass the context of the entire application to the compiled templates so that you can get data and data\compudet, etc.?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question