t-doog
t-doog

Reputation: 2535

vuejs not rendering components

I'm new to vue, and I can not seem to figure out why is the new Vue ()" function does not work properly. This is my code. Thanks in advance.

<html>
<head>
<meta charset="utf-8" />
<title>First App</title>
<script src="https://unpkg.com/vue"></script>
<script src="main.js"></script>
</head>
<body>
  <div id="app">
     <greeting></greeting>
  </div>
</body> 

Upvotes: 0

Views: 53

Answers (1)

yacine benzmane
yacine benzmane

Reputation: 4178

Put the main.js file in your <body> tag. This happens because the javascript is executed before the dom was loaded. If you have any question after let me know.

Upvotes: 1

Related Questions