0
On the child component use:
let info1 = this.$route.params;
let info = info1[Object.keys(info1)[0]]
0
You can do this with Props.
In first parent component:
<SharedComponent :prop="$route.params.something"></SharedComponent>
In second parent component:
<SharedComponent :prop="$route.params.anothersomething"></SharedComponent>
In third parent:
<SharedComponent :prop="$route.params.yetanothersomething"></SharedComponent>
- [Vuejs]-Check correct radio button based on db value
- [Vuejs]-Why variable is not defined in created() method
Source:stackexchange.com