vue router redirect and push data code example
Example 1: vue redirect to route
// Use this in a lifecycle method
this.$router.push('/login');
Example 2: vue router push
//Syntax - this.$router.push(path);
this.$router.push("/path");
// Use this in a lifecycle method
this.$router.push('/login');
//Syntax - this.$router.push(path);
this.$router.push("/path");