vue-router push with params code example
Example 1: vue router.push with params
router.push('/users/eduardo')
router.push({ path: '/users/eduardo' })
router.push({ name: 'user', params: { username: 'eduardo' } })
router.push({ path: '/register', query: { plan: 'private' } })
router.push({ path: '/about', hash: '#team' })
Example 2: vue router push
this.$router.push("/path");
Example 3: go to next route vuejs
router.push('home')
router.push({ path: 'home' })
router.push({ name: 'user', params: { userId: '123' } })
router.push({ path: 'register', query: { plan: 'private' } })