Vue instance not mounting on instantiation

Viewed 335

I am using vue-loader in webpack and have a vue-dialog.vue file with <script>, <style> and <template>.

When I do import dialog from './vue-dialog.vue inside another file and call new Vue(dialog) I get a instance. But if I call .$mount() on it (to mount it off DOM) I get a error:

 [Vue warn]: Failed to mount component: template or render function not defined.

When I do console.log(dialog.render) I se the function there, when I do console.log(instance.render) its undefined.

If I instanciate it without calling .$mount() the instance has no .$el property, its undefined...

What am I missing? how else can I import a .vue file to another and call new Vue() to instanciate it and then mount it so I have a .$el element from the instance?

1 Answers
Related