8000 Index is undefined. · vishalkakadiya/vuejs.org@e85074a · GitHub
[go: up one dir, main page]

Skip to content

Commit e85074a

Browse files
Index is undefined.
Fix issue of index is undefined, as every time first element was deleted not the current one.
1 parent 6d953bc commit e85074a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/guide/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,9 @@ new Vue({
160160
<div id="app">
161161
<input v-model="newTodo" v-on:keyup.enter="addTodo">
162162
<ul>
163-
<li v-for="todo in todos">
163+
<li v-for="(todo, index) in todos">
164164
<span>{{ todo.text }}</span>
165-
<button v-on:click="removeTodo($index)">X</button>
165+
<button v-on:click="removeTodo(index)">X</button>
166166
</li>
167167
</ul>
168168
</div>

0 commit comments

Comments
 (0)
0