In my current project, I am attempting to pass a variable as the parameter to vue-router in order to dynamically set it. The code snippet below demonstrates what I am trying to achieve:
<router-link :to="{
name: notification.name,
(notification.param_name): notification.param_value
}">Blabla</router-link>
I want to clarify that I am not interested in defining the key using var[notification.param_name]
.
While this question could potentially be applied to a broader issue, I find it challenging to articulate it differently at this time.