I want to use param value of the url
but the params object is undefined in $router in my case
so how can I use params value
<script>
export default{
data(){
return{
item:{},
}
},
mounted(){
console.log(this.$router);
},
}
</script>
as you can see of the picture, there is no params object
You can get access to params like :
mounted(){
console.log(this.$router.currentRoute.params);
},