0

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

1
  • document.createElement('rightrow'); This isn't how to create Vue components. You have to let Vue draw the DOM elements. Vue has an excellent Getting Started guide -- you really ought to read through it Commented Mar 15, 2018 at 19:58

1 Answer 1

1

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

import RightRow from "./RightRow.vue"
const rrow = new RightRow();
Sign up to request clarification or add additional context in comments.

3 Comments

And how do I implement this in my HTML source?
If you used Vue.component('right-row', ...) then you can use <right-row> in your HTML
but I need to implement with my js source, because there have to be more of them and the number is variable

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.