Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8" />
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
- <title>Vue Basics</title>
- <link
- href="https://fonts.googleapis.com/css2?family=Jost:wght@400;700&display=swap"
- rel="stylesheet"
- />
- <link rel="stylesheet" href="styles.css" />
- <script src="https://unpkg.com/vue@next" defer></script>
- <script src="app.js" defer></script>
- </head>
- <body>
- <header>
- <h1>Reactivity in Action</h1>
- </header>
- <section id="assignment">
- <button @click="addFive">Add 5</button>
- <button @click="addOne">Add 1</button>
- <!-- 1) Connect the buttons and calculate a value (a number) -->
- <!-- Show "Not there yet" until you reach a result of exactly 37 -->
- <!-- Show "Too much!" if the result is greater than 37 -->
- <p>Result: {{ shownResult }}</p>
- <!-- 2) Watch for changes in "result" and reset the value to 0 after 5 seconds -->
- </section>
- </body>
- </html>
Add Comment
Please, Sign In to add comment