diff --git a/basics-03-events-starting-code/app.js b/basics-03-events-starting-code/app.js index 0143165..5a87e3b 100644 --- a/basics-03-events-starting-code/app.js +++ b/basics-03-events-starting-code/app.js @@ -4,6 +4,14 @@ const app = Vue.createApp({ counter: 0, }; }, + methods: { + increaseCounter() { + this.counter++; + }, + decreaseCounter() { + this.counter--; + }, + }, }); app.mount("#events"); diff --git a/basics-03-events-starting-code/index.html b/basics-03-events-starting-code/index.html index e9cf80d..0e73c33 100644 --- a/basics-03-events-starting-code/index.html +++ b/basics-03-events-starting-code/index.html @@ -17,8 +17,8 @@

Events in Action

- - + +

Result: {{ counter }}