E
E
embiid2019-06-05 20:13:12
JavaScript
embiid, 2019-06-05 20:13:12

Why is the Vue.js component not showing up?

Started learning VueJS. I read the documentation a lot and for a long time. I decided to sit down and start doing, I already stumbled upon the problem that I can’t display the VueJS component.

new Vue.component('quiz-cell', {
    template: "<p>Hey there, I'm a re'usable component</p>"
});

<div class="cell">
                    <quiz-cell></quiz-cell>
                </div>

What is the problem? Just watched a video on VueJS, the guy did everything the same way as I described in the code above. I decided, maybe I need to create an instance, like here: https://jsfiddle.net/nu41bvfq/
new Vue({
     el: '#cell'
 })
|
Still not displayed. Vuejs - connected, tried it on a simple HelloWorld from the documentation.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
0
0xD34F, 2019-06-05
@embiid

Started learning VueJS. I read the documentation a lot and for a long time.

It's better to start by learning just JS, without Vue. Read a lot and for a long time. So that this does not happen:
Of course, you have no idea what "new" is, and why it is needed here (not needed).

D
Denis Bazarnov, 2019-06-05
@bazden

<!DOCTYPE html>
<html>
<head>
<title>Изучаем Vue.js</title>
<meta charset="utf-8" />
</head>
<body>
<div id="app">
     
</div>
<script src="https://unpkg.com/vue"></script>
<script>
    var app = new Vue({
        el: '#app'
    })
</script>
</body>
</html>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question