Router Configuration Example :
const routes = [
{ path: '/' , redirect: '/login'},
{ path: '/chat', component: MyChat, props: true},
{ path: '/login', component: MyLogin},
]
Defining the Chat Component with Props :
export default {
name: "MyChat",
props:{
avatar_url : {
type: String,
}
}
Using Router Push to Pass Props :
this.$router.push({path:'/chat',props: {avatar_url: 'rrrrrrr'}});
Directly Passing Props in Routes Array Works:
const routes = [
{ path: '/' , redirect: '/login'},
{ path: '/chat', component: MyChat,props: {avatar_url: 'myurl'}},
{ path: '/login', component: MyLogin},
]
Issue arises when trying to pass props using this.$router.push. Any insights on how to solve this would be appreciated.