I'm trying to get just a simple hello world for v-for. I've googled this for an hour and found various other posts, such as this one to no use.
My HTML:
<ul>
<li v-for="item in history">
{{ item }}
</li>
</ul>
My JS:
new Vue({
el: '#app',
data: {
history: [
'red','green','blue'
],
},
});
My Output:
{{ item }}
Someone please tell me what I'm doing wrong and why I can't get this bare-bones example working. I've tried using arrays and objects, looping using the key attribute, and several other things.
Docs: https://v2.vuejs.org/v2/guide/list.html
EDIT: apologise for the awful title; I had to change it 13 times before SO stopped yelling at me...
EDIT 2: I have the app defined containing the entire body of HTML: <div id="app">, thank you for the answers though : )
EDIT 3: Resolved, I must've had a div tag closed prematurely; commenting it out fixed the code. Thanks for the answers.

v-forworking. What's wrong with my code?