vue router push

// Import Vue and Vue Router
import Vue from 'vue'
import VueRouter from 'vue-router'

// Use Vue Router in your Vue application
Vue.use(VueRouter)

// Define your routes
const routes = [
  { path: '/', component: Home },
  { path: '/about', component: About },
  { path: '/contact', component: Contact }
]

// Create a new Vue Router instance with the defined routes
const router = new VueRouter({
  routes
})

// Create Vue instance and use the router
const app = new Vue({
  router
}).$mount('#app')

// Inside a Vue component method, use the router's push method to navigate to a new route
// For example, pushing to the '/about' route
this.$router.push('/about')