0 votes
in VueJS by
What is the use of compile method?

1 Answer

0 votes
by
VueJS provides compile method which is used to compile a template string into a render function. This method is only available in the full build.

For example, you can compile template message:

var result = Vue.compile('<div><span>{{ msg }}</span></div>')

new Vue({
  data: {
    msg: 'Welcome to Vue world'
  },
  render: result.render,
  staticRenderFns: result.staticRenderFns
})

Related questions

0 votes
asked Sep 10, 2023 in VueJS by DavidAnderson
0 votes
asked Sep 7, 2023 in VueJS by DavidAnderson
...