From 8106085e2dbe1f2498d50acfb648ba02e4f591f7 Mon Sep 17 00:00:00 2001 From: Tyrel Souza Date: Sun, 15 Apr 2018 23:33:40 -0400 Subject: [PATCH] s5e75 lifecycle --- lessons/app.js | 35 ++++++++++++++++++++++++++++++----- lessons/index.html | 31 +++---------------------------- 2 files changed, 33 insertions(+), 33 deletions(-) diff --git a/lessons/app.js b/lessons/app.js index 7034975..0ed8cb2 100644 --- a/lessons/app.js +++ b/lessons/app.js @@ -1,10 +1,35 @@ var app = new Vue({ el: '#app', data: { - ingredients: ['meat', 'fruit', 'cookies'], - persons: [ - {name: "Max", age: 33, color: "red"}, - {name: "Tyrel", age: 30, color: "blue"}, - ] + title: "The VueJS nstance" + }, + beforeCreate(){ + console.log("Created"); + }, + created(){ + console.log("created"); + }, + beforeMount(){ + console.log("beforeMount"); + }, + mounted(){ + console.log("mounted"); + }, + beforeUpdate(){ + console.log("before update"); + }, + updated(){ + console.log("updated"); + }, + beforeDestroy(){ + console.log("before destroy"); + }, + destroyed(){ + console.log("destroyed"); + }, + methods:{ + destroy(){ + this.$destroy(); + } } }); diff --git a/lessons/index.html b/lessons/index.html index ecab837..2425457 100644 --- a/lessons/index.html +++ b/lessons/index.html @@ -7,34 +7,9 @@
- - - -
- -
- - -
- - {{n}} - - - + {{title}} + +