0

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> 
1
  • 2
    Need to see the javascript code as well Commented Jul 17, 2018 at 21:32

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

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.