newbie Nuxt question:
I try to redirect to the same route with a different param, and have no idea how to use $nuxt to push the route so I tried the below vue router.
The url is changed but mounted hook does not get invoked to change the data
methods: {
changeMatch(event) {
this.$router.push({
name: "tran-dau-id-tuong-thuat",
params: { id: event.target.value },
});
},
Update: I follow https://router.vuejs.org/guide/essentials/dynamic-matching.html#reacting-to-params-changes
watch: {
$route(to, from) {
if (to.params.id != from.params.id) {
this.loadFixture();
}
},
},