Q:

vue router push

this.$router.currentRoute
5
//Syntax - this.$router.push(path);
this.$router.push("/path");
8
// literal string path
router.push('home')

// object
router.push({ path: 'home' })

// named route
router.push({ name: 'user', params: { userId: '123' } })

// with query, resulting in /register?plan=private
router.push({ path: 'register', query: { plan: 'private' } })
2

New to Communities?

Join the community