]> git.ipfire.org Git - thirdparty/vuejs/router.git/commitdiff
chore: testing watchers
authorEduardo San Martin Morote <posva13@gmail.com>
Fri, 5 Jul 2019 13:35:42 +0000 (15:35 +0200)
committerEduardo San Martin Morote <posva13@gmail.com>
Fri, 5 Jul 2019 13:35:42 +0000 (15:35 +0200)
explorations/html5.ts

index 27894fc43e815c7fa8f0fc66554a3140dc44b29d..ece68baa0e2f4ddd917b6973c372f9c03d86f15f 100644 (file)
@@ -160,6 +160,16 @@ window.vm = new Vue({
     message: 'hello',
     shared,
   },
+
+  // try out watchers
+  // watch: {
+  //   '$route.params.id' (id) {
+  //     console.log('id changed', id)
+  //   },
+  //   '$route.name' (name) {
+  //     console.log('name changed', name)
+  //   }
+  // }
 })
 
 run()