i have this json object
blog:{
"_id": "62567252370e769a8a93a517",
"title": "my trip to zanziar"
}
i'm trying to show in my url
http://localhost:8082/blog/my-trip-to-zanziar
in my url
but i'm getting
http://localhost:8082/blog/my%20trip%20to%20zanziar
and its not displaying any data
this is how i go to the route
<router-link :to="`/blog/${blog._title}`">
</router-link>
this is my router
{
path: "/blog/:title",
},
this is how i diplay to get the details under the title
mounted() {
axios
.get(`http://localhost:4000/api/blogs/${this.$route.params.title}`, {})
.then(response => {
console.log(response);
this.blog = response.data.blog;
})
.catch(error => {
console.log(error);
});
}
please how i can go about this