vue router-link to name code example
Example 1: vue router push
//Syntax - this.$router.push(path);
this.$router.push("/path");
Example 2: vue router name
<router-link :to="{ name: 'user', params: { userId: 123 }}">User</router-link>
//Syntax - this.$router.push(path);
this.$router.push("/path");
<router-link :to="{ name: 'user', params: { userId: 123 }}">User</router-link>