Question 32
Consider the below Vue router configuration.
const routes = [ { path: '/user/:id', component: UserProfile }];
const router = new VueRouter({ routes});Which of the following is a valid way to access the “id” parameter inside the UserProfile component?
this.$route.params.id
this.$router.params.id
this.$route.query.id
this.$route.params['id']