how to get route from router vue code example
Example 1: get params from route vuejs
const User = {
template: '<div>User {{ $route.params.id }}</div>'
}
Example 2: vue js get routes
this.$router.options.routes
const User = {
template: '<div>User {{ $route.params.id }}</div>'
}
this.$router.options.routes