index.html 754 B

12345678910111213141516171819202122232425262728293031
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>Title</title>
  6. <link rel="stylesheet" href="../styles.css" />
  7. <link rel="stylesheet" href="styles.css" />
  8. </head>
  9. <body>
  10. <nav>
  11. <h1><span class="index">4</span>Vue event listeners</h1>
  12. <ul>
  13. <li><a href="../lesson3">Prev</a></li>
  14. <li><a href="../lesson5">Next</a></li>
  15. </ul>
  16. </nav>
  17. <div id="root">
  18. <ul>
  19. <li v-for="name in names" v-text="name"></li>
  20. </ul>
  21. <input v-model="newName" type="text" />
  22. <button @click="addName">Add name</button>
  23. {{/* Delete last name */}}
  24. </div>
  25. <script src="../lib/vue-2.1.3.js"></script>
  26. <script src="code.js"></script>
  27. </body>
  28. </html>