[Vuejs]-How to set a property on Vue js router

0👍

It is possible to send props programatically from a component to router path

'/usersFeeds':{
      component: function(resolve){
        require([commonSections + 'usersFeeds.vue'], resolve);
      },
      auth: true,
      user: '',
      props: true
    },

router.push({ 
   path : 'path',
   params: { user: 'userName' }
})

The params user is passed as props to the component where it is redirected

👤chans

Leave a comment