From 1ac671e702c6d54117bdd77931cd14a5569df74c Mon Sep 17 00:00:00 2001 From: Tyrel Souza Date: Fri, 13 Apr 2018 13:44:28 -0400 Subject: [PATCH] @click --- app.js | 11 ++++------- index.html | 6 ++---- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/app.js b/app.js index cd2b6ba..e9671d8 100644 --- a/app.js +++ b/app.js @@ -1,14 +1,11 @@ var app = new Vue({ el: '#app', data: { - title: "Hello World", - link: "https://google.com", - finishedLink: 'Google' + counter: 0 }, - methods: { - sayHello(){ - this.title = 'Hello'; - return this.title; + methods:{ + click(){ + this.counter++; } } }) diff --git a/index.html b/index.html index 2da3f6e..4cf4f04 100644 --- a/index.html +++ b/index.html @@ -7,10 +7,8 @@
-

{{title}}

-

{{ sayHello() }}

- Google - -

+ +

{{ counter }}