Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
</head>
<body>
<div class="app">
  <input type="text" placeholder="請輸入代辦事項" 
         @keyup.enter="addTodo(newTodo)" v-model="newTodo">
  <h2>事項列表</h2>
  <ul >
    <li v-for="todo in todos" v-bind:class="{ active: todo.completed }">
      <input  type="checkbox" v-model="todo.completed">
      {{todo.content}}
      - <a href="#" @click.prevent="removeTodo(todo)">刪除</a>
    </li>
  </ul>
<pre>
  {{this.todos}}
</pre>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.0.3/vue.js"></script>
</div>
</body>
</html>
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers