I'm encountering an issue with vue-router.
I got a list of posts in the homepage. When I click on one of them, it redirects to the post page such as :
<router-link :to="{ name: 'article', params: {id: article.id, slug: article.slug } }"></router-link>
Everything is working perfectly, I can retrieve the data of the correct article using this.$route.params.id
in a getter.
My issue : When I reload on an article page, this.$route.params.id
is undefined, which causes the entire application to crash.
How can I save the router.params
despite a page reload ?