[Vuejs]-Can I get Vue.js component as an instance?

0👍

It’s possible to access component template with vmComponent.options.template.

A template can be declared as a string for reuse:

export const template = `...`;

const vmComponent = Vue.component('VueComponent', {
  template,
  ...
});

This may not work with pre-compiled templates.

Leave a comment