twhoffma / grog-ui-vue3

Vue v3 based
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Watch on route and route navigation on template filter dialog #1

Open twhoffma opened 3 years ago

twhoffma commented 3 years ago

On query changes, only the GeekList template needs to be loaded since ordering comes from the db. On listid change, all needs to be loaded new.

watch: { '$route' (to, from) { ... do something ... } }

  deep: true,
  immediate: true

In our case maybe? Dunno what

watch: { "$route.params": { handler: function(params) { console.log("watch foo"); console.log(params); console.log(this.$route); console.log("watch foo"); }, deep: true, immediate: true }, $route(to, from) { console.log(to); } },

this.$router.push({ name: page, params: { page: page } });