...
 
Commits (3)
......@@ -8,5 +8,5 @@ import Hello from './components/Hello'
new Vue({
el: '#app',
// render: h => h(Hello)
components: {Hello}
components: {Hello},
});
......@@ -4,7 +4,7 @@
<input type="text" id="itemInput" v-model="newItem" />
<input type="button" value="Go" v-on:click="addToList"/>
<ul>
<li v-for="item in helloList">Hello <span v-text="item"></span>!</li>
<li v-for="item in helloList">{{greeting}} <span v-text="item"></span>!</li>
</ul>
</div>
</template>
......@@ -24,5 +24,8 @@
this.helloList.push(this.newItem);
}
},
props: {
greeting: String
}
}
</script>
......@@ -7,7 +7,7 @@
<body>
<div id="app">
<hello></hello>
<hello greeting="Hello"></hello>
</div>
<!-- It doesn't seem to work with the scripts in the head section. -->
......