vue js get route by name or params code example Example: get params from route vuejs const User = { template: '<div>User {{ $route.params.id }}</div>' }