Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
32 lines (31 sloc) 963 Bytes
<div id="app">
<p v-for="todo in todos">
<todoitem :title=todo.title :completed=todo.completed></todoitem>
<script src=""></script>
const ToDoItem = {
template: '<div><input type="checkbox" v-model="completed"/>{{ id }}: {{ title }}</div>',
props: ['id', 'title', 'completed']
new Vue({
el: '#app',
data: { todos: [] },
components: {'todoitem': ToDoItem},
mounted() {
methods: {
loadToDos() {
.then(response => response.json())
.then(json => this.todos = json.slice(0,5))
You can’t perform that action at this time.