If I am on a route:
person/:slug
And I click the link:
<div v-for="person in persons" v-link="{ name: 'person', params: { slug: person.slug }}">
The URL will change the setting, but the actual content / component will not be updated. If I remove the update, it will be from the moment the URL is updated. I tried the canReuse property with no luck.
Routes
router.map({
'/': {
name: 'search',
component: Search
},
'/person/:slug': {
name: 'person',
component: Person
}
})
component:
<template>
{{ person.slug }}
</template>
<script>
import PersonRepository from '../person-repository.vue'
export default {
data () {
return { person: null }
},
asyncData (resolve, reject) {
return PersonRepository.get(this, this.$route.params.slug).then((person) => {
return { person: person }
})
}
}
</script>
source
share