loloof64

UdemyVueJSCourse - ListAssign 1 - Html

Oct 1st, 2020
323
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 1.21 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3.   <head>
  4.     <meta charset="UTF-8" />
  5.     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  6.     <title>Vue Basics</title>
  7.     <link
  8.      href="https://fonts.googleapis.com/css2?family=Jost:wght@400;700&display=swap"
  9.      rel="stylesheet"
  10.    />
  11.     <link rel="stylesheet" href="styles.css" />
  12.     <script src="https://unpkg.com/vue@next" defer></script>
  13.     <script src="app.js" defer></script>
  14.   </head>
  15.   <body>
  16.     <header>
  17.       <h1>Vue Lists and Conditional Content</h1>
  18.     </header>
  19.     <section id="assignment">
  20.       <h2>Assignment</h2>
  21.       <!-- 1) Add code to manage a list of tasks in a Vue app -->
  22.       <!-- When clicking "Add Task" a new task with the entered text should be added -->
  23.       <input type="text" v-model="currentTask">
  24.       <button @click="addTask">Add Task</button>
  25.       <ul v-if="listVisible">
  26.         <li v-for="singleTask in tasks">{{singleTask}}</li>
  27.       </ul>
  28.       <!-- 3) When the below button is pressed, the list should be shown or hidden -->
  29.       <!-- BONUS: Also update the button caption -->
  30.       <button @click="toggleListVisibility">{{buttonCaption}}</button>
  31.     </section>
  32.   </body>
  33. </html>
  34.  
Add Comment
Please, Sign In to add comment