From 12053e4e2b6e2221135e31565776f33c0cca5ea7 Mon Sep 17 00:00:00 2001 From: Tyrel Souza Date: Fri, 13 Apr 2018 14:34:38 -0400 Subject: [PATCH] s2e25 shorthands --- app.js | 23 +++-------------------- index.html | 9 ++------- 2 files changed, 5 insertions(+), 27 deletions(-) diff --git a/app.js b/app.js index 9f8251e..5258162 100644 --- a/app.js +++ b/app.js @@ -1,28 +1,11 @@ var app = new Vue({ el: '#app', data: { - counter: 0, - secondCounter: 0, + link: 'https://tyrelsouza.com', }, methods: { - result(){ - console.log("result"); - return this.counter >= 5 ? ">=5" : "<5" - } - }, - watch: { - counter(value){ - var vm = this; - setTimeout(function(){ - vm.counter = 0; - }, 2000) - } - }, - computed: { - output(){ - console.log("computed"); - return this.counter >= 5 ? ">=5" : "<5" - + changeLink(){ + this.link = "https://tyrel.bike"; } } diff --git a/index.html b/index.html index 7dd445c..24d1181 100644 --- a/index.html +++ b/index.html @@ -6,14 +6,9 @@
- - - -

counter: {{counter}} | {{secondCounter}}

-

result: {{result()}} | {{ output }}

+ + Link
- -