Is there way to render this simple vue example?
Hello -
I have an example script that i am working on through a new course i am taking. I have attached the two files and when I select to preview in safari when in the index.html file it shows the actual text {{ sayHello() }} instead of the function listed in JavaScript.
Please let me know what I may be doing wrong or if it is not possible!
Thanks.
Nick
Answer
Hello,
sorry, but I'm not familiar with vue.js.
I've looked at the index.html file and it doesn't look like a complete HTML file to me (missing html, head, body tags). Also, the .html file does not reference the app.js file anywhere.
Hello Alexander -
I’ve updated the code to include those tags. The JavaScript file is in the same folder as the HTML file. For Vue, you only need the script tag to reference the url which is in the script tag. I added these two files into js fiddle and the page renders appropriately.
Please let me know your thoughts.
Thanks,
Nick
It looks like you need to include vue.js after the #app div. I changed the index.html file to this and it worked for me:
Customer support service by UserEcho
It looks like you need to include vue.js after the #app div. I changed the index.html file to this and it worked for me:
index.html