Jonas Zeiser
Jonas Zeiser

Reputation: 1

create multiple vue-elements of the same component in js-script

my problem is the following: I want to create some vue elements like this:

var rRow = document.createElement('rightrow');

rightRow is a vue Element and should be importet like this:

<rightRow></rightRow>

As I look into Chrome Developer Tools, the HTML code looks as it shoukd be, but the vue element isn't there. If I insert it 'by hand'(just write where it should be) it works, but I need it more often. Thanks to every helping hand :D

Sorry if my english isn't the best. I'm no native speaker xD

EDIT: In my Chrome-Developer-Tools the component can be seen. I just need to know how I can render it again because the text is right but the Vue-View isn't

Upvotes: 0

Views: 250

Answers (1)

Meghan
Meghan

Reputation: 1261

Vue uses the ES2015 class sytax and can instantiated via their constructors.

import RightRow from "./RightRow.vue"
const rrow = new RightRow();

Upvotes: 1

Related Questions