diff --git a/app.js b/app.js index e598ca5..c3f91c2 100644 --- a/app.js +++ b/app.js @@ -1,6 +1,21 @@ var app = new Vue({ el: '#app', data: { - name: "Tyrel" + counter: 0, + secondCounter: 0, }, + methods: { + result(){ + console.log("result"); + return this.counter >= 5 ? ">=5" : "<5" + } + }, + computed: { + output(){ + console.log("computed"); + return this.counter >= 5 ? ">=5" : "<5" + + } + } + }) diff --git a/index.html b/index.html index d1aa8ff..7dd445c 100644 --- a/index.html +++ b/index.html @@ -6,8 +6,11 @@
- -

{{name}}

+ + + +

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

+

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